| [ Index ] |
PHP Cross Reference of Akelos Framework |
[Summary view] [Print] [Text view]
1 <?php 2 3 class AkMailPart extends AkMailBase 4 { 5 6 7 function prepareHeadersForRendering($options = array()) 8 { 9 if($this->isMultipart()){ 10 $this->filterHeaders(array('only' => array('Content-Type'))); 11 }else{ 12 $this->filterHeaders(); 13 } 14 } 15 16 function filterHeaders($options = array()) 17 { 18 $default_options = array( 19 20 'only' => empty($options['include']) ? array( 21 'Content-Type', 22 'Content-Transfer-Encoding', 23 'Content-Id', 24 'Content-Disposition', 25 'Content-Description', 26 27 ) : array() 28 ); 29 30 $options = array_merge($default_options, $options); 31 32 if(!empty($options['only'])){ 33 $headers = $this->getHeaders(); 34 $this->headers = array(); 35 foreach ($options['only'] as $allowed_header){ 36 if(isset($headers[$allowed_header])){ 37 $this->headers[$allowed_header] = $headers[$allowed_header]; 38 } 39 } 40 }elseif (!empty($options['except'])){ 41 $this->headers = array(); 42 foreach ($options['except'] as $skip_header){ 43 unset($this->headers[$skip_header]); 44 } 45 } 46 } 47 } 48 49 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Oct 27 12:43:49 2008 | Cross-referenced by PHPXref 0.6 |