コード例 #1
0
ファイル: HtmlBuilder.php プロジェクト: supergud/windwalker
 /**
  * buildAttributes
  *
  * @param array $attribs
  *
  * @return  string
  */
 public static function buildAttributes($attribs)
 {
     $attribs = static::mapAttrValues($attribs);
     return parent::buildAttributes($attribs);
 }
コード例 #2
0
ファイル: HtmlBuilder.php プロジェクト: kiyayeh/windwalker
 /**
  * Create a html element.
  *
  * @param string $name      Element tag name.
  * @param mixed  $content   Element content.
  * @param array  $attribs   Element attributes.
  * @param bool   $forcePair Force pair it.
  *
  * @return  string Created element string.
  */
 public static function create($name, $content = '', $attribs = array(), $forcePair = false)
 {
     $paired = $forcePair ?: !in_array(strtolower($name), static::$unpairedElements);
     $attribs = static::mapAttrValues($attribs);
     return parent::create($name, $content, $attribs, $paired);
 }