Pop\Feed\Format\Php::__construct PHP Метод

__construct() публичный Метод

Method to create a PHP feed object
public __construct ( mixed $options, integer $limit ) : Php
$options mixed
$limit integer
Результат Php
    public function __construct($options, $limit = 0)
    {
        parent::__construct($options, $limit);
        // Create the PHP data object from the serialized PHP string source
        if (null === $this->obj) {
            if (!($this->obj = unserialize($this->source))) {
                throw new Exception('That feed URL cannot be read at this time. Please try again later.');
            }
        }
    }

Usage Example

Пример #1
0
 /**
  * Method to create a Flickr Php feed object
  *
  * @param  mixed  $options
  * @param  int    $limit
  * @return \Pop\Feed\Format\Php\Flickr
  */
 public function __construct($options, $limit = 0)
 {
     // Attempt to get the correct URL to parse
     if (is_array($options)) {
         if (isset($options['id'])) {
             $this->url = str_replace('[{id}]', $options['id'], $this->urls['id']);
         }
     }
     parent::__construct($options, $limit);
 }