示例#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();
 }
示例#2
0
 /**
  * Return stringified XML document
  */
 public function toString()
 {
     /*
      * End feed element
      */
     $this->endElement();
     /*
      * Write result
      */
     return parent::toString();
 }