Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Inheritance: implements Puli\Repository\Api\Resource\PuliResource
 public function __construct($path = null, array $children = array())
 {
     parent::__construct($path);
     foreach ($children as $child) {
         $this->children[$child->getName()] = $child;
     }
     $this->metadata = new TestMetadata();
 }
Esempio n. 2
0
 public function __construct($path = null, $body = self::BODY)
 {
     parent::__construct($path);
     $this->body = $body;
     $this->metadata = new TestMetadata();
 }
 protected function postUnserialize(array $data)
 {
     $this->filesystemPath = array_pop($data);
     parent::postUnserialize($data);
 }
Esempio n. 4
0
 protected function postUnserialize(array $data)
 {
     $this->targetPath = array_pop($data);
     parent::postUnserialize($data);
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     $root = new GenericResource('/');
     $root->attachTo($this);
     // Subtract root
     $removed = count($this->resources) - 1;
     $this->resources = array('/' => $root);
     $this->clearVersions();
     $this->storeVersion($root);
     return $removed;
 }