public function __construct($path = null, array $children = array()) { parent::__construct($path); foreach ($children as $child) { $this->children[$child->getName()] = $child; } $this->metadata = new TestMetadata(); }
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); }
protected function postUnserialize(array $data) { $this->targetPath = array_pop($data); parent::postUnserialize($data); }
/** * {@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; }