コード例 #1
0
ファイル: Bundler.php プロジェクト: tuneyourserver/components
 /**
  * @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();
     }
 }
コード例 #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 . '}';
 }