Beispiel #1
0
 /**
  * Sets the content of the Collection from a JSON string.
  *
  * @param string $content JSON.
  */
 public function setContent($content)
 {
     $obj = Object::import($content);
     $this->setVersion($obj->getVersion());
     $this->setHref($obj->getHref());
     $this->setLinks($obj->getLinks());
     $this->setItems($obj->getItems());
     $this->setQueries($obj->getQueries());
     if ($t = $obj->getTemplate()) {
         $this->setTemplate($t);
     }
     if ($e = $obj->getError()) {
         $this->setError($e);
     }
     return $this;
 }
Beispiel #2
0
 public function __construct(array $dataArray = NULL)
 {
     parent::__construct();
     $this->setDataArray($dataArray);
 }