SimplePie::get_encoding PHP Method

get_encoding() public method

Get the character encoding used for output
public get_encoding ( ) : string
return string
    public function get_encoding()
    {
        return $this->sanitize->output_encoding;
    }

Usage Example

 /**
  * MagpieFromSimplePie constructor
  *
  * @param SimplePie $pie The feed to convert to MagpieRSS format.
  * @param mixed $item
  *
  * @uses SimplePie::get_items
  * @uses MagpieFromSimplePie::processFeedData
  * @uses MagpieFromSimplePie::processItemData
  * @uses MagpieFromSimplePie::normalize 
  * @uses MagpieFromSimplePie::is_atom
  */
 function __construct($pie, $item = true)
 {
     $this->pie = $pie;
     // item in {NULL, true} = process channel data
     if (!is_a($item, 'SimplePie_Item')) {
         $this->originals = $this->pie->get_items();
         $this->channel = $this->processFeedData($this->pie->data);
     } else {
         $this->originals = array($item);
         $this->channel = NULL;
     }
     // item in {true, SimplePie_Item} = process item data
     if (!is_null($item)) {
         foreach ($this->originals as $key => $item) {
             $this->items[$key] = $this->processItemData($item->data);
         }
     } else {
         $this->items = NULL;
     }
     $this->normalize();
     // In case anyone goes poking around our private members (uh...)
     $this->feed_type = $this->is_atom() ? 'Atom' : 'RSS';
     $this->feed_version = $this->feed_version();
     $this->encoding = $pie->get_encoding();
 }
All Usage Examples Of SimplePie::get_encoding