Esempio n. 1
0
 /**
  * Constructor
  * 
  * @param RestoContext $context
  * @param RestoModel $model
  * @param Array $statistics
  * @param RestoCollection $collection
  */
 public function __construct($context, $model, $statistics, $collection)
 {
     parent::__construct();
     $this->context = $context;
     $this->model = $model;
     $this->statistics = $statistics;
     $this->collection = $collection;
     $this->clientId = isset($this->context->query['clientId']) ? 'clientId=' . rawurlencode($this->context->query['clientId']) . '&' : '';
     if (isset($this->collection)) {
         $this->osDescription = isset($this->collection->osDescription[$this->context->dictionary->language]) ? $this->collection->osDescription[$this->context->dictionary->language] : $this->collection->osDescription['en'];
     } else {
         $this->osDescription = isset($this->context->osDescription[$this->context->dictionary->language]) ? $this->context->osDescription[$this->context->dictionary->language] : $this->context->osDescription['en'];
     }
     $this->setOSDD();
 }
Esempio n. 2
0
 /**
  * Constructor
  * 
  * @param string $id
  * @param string $title
  * @param string $subtitle
  */
 public function __construct($id, $title, $subtitle)
 {
     parent::__construct();
     /*
      * Start ATOM feed
      */
     $this->startAtomFeed($id, $title, $subtitle);
     /*
      * Set title, subtitle and generator
      */
     $this->setBaseElements($title, $subtitle);
     /*
      * Set id
      */
     $this->writeElement('id', $id);
 }