Ejemplo n.º 1
0
 /**
  * @param Supervisor $supervisor
  * @param string     $path
  * @param array      $token
  */
 public function __construct(Supervisor $supervisor, $path, array $token = [])
 {
     $node = $supervisor->createNode($path, $token);
     $supervisor = $node->supervisor();
     if ($supervisor instanceof Supervisor) {
         $this->importers = $supervisor->getImporters();
     }
 }
Ejemplo n.º 2
0
 /**
  * Create placeholder block (to be injected with inner blocks defined in context).
  *
  * @param string $name
  * @param string $blockID
  * @return string
  */
 protected function createPlaceholder($name, &$blockID)
 {
     $blockID = $name . '-' . $this->supervisor->uniquePlaceholder();
     //Short block declaration syntax
     return '${' . $blockID . '}';
 }