コード例 #1
0
ファイル: Tag.php プロジェクト: irfanevrens/html
 /**
  * @param $tagTextOrArray
  *
  * @return self
  */
 protected function addChild($tagTextOrArray)
 {
     // a list of arguments to be passed to builder->make()
     if (is_array($tagTextOrArray) && !empty($tagTextOrArray)) {
         if (!isset($this->builder)) {
             throw new \InvalidArgumentException(sprintf('Builder not attached to tag `%s`', $this->tag));
         }
         $tagName = $tagTextOrArray[0];
         $props = isset($tagTextOrArray[1]) ? $tagTextOrArray[1] : [];
         $content = isset($tagTextOrArray[2]) ? $tagTextOrArray[2] : [];
         $tagTextOrArray = $this->builder->make($tagName, $props, $content);
     }
     array_push($this->content, $tagTextOrArray);
     return $this;
 }
コード例 #2
0
ファイル: core.php プロジェクト: MIcQo/beCMS
 public function buildHTML()
 {
     $this->HTML = Builder::make();
 }