attachTo() public method

public attachTo ( Puli\Repository\Api\ResourceRepository $repo, $path = null )
$repo Puli\Repository\Api\ResourceRepository
Esempio n. 1
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;
 }