コード例 #1
0
ファイル: debug.php プロジェクト: nooku/nooku-framework
 /**
  * Dump an object
  *
  * @param   mixed         $var    Variable to dump
  * @param   ObjectConfig $config The configuration options
  * @param   integer       $level  Current recursion level (internal usage only)
  * @return  string
  */
 protected function _dumpResource($var, ObjectConfig $config, $level = 0)
 {
     $type = get_resource_type($var);
     $result = '<span class="koowa-dump-resource">' . StringEscaper::html($type) . ' resource</span>';
     if (isset($config->resources[$type])) {
         $result = '<span class="koowa-toggle koowa-collapsed">' . $result . '</span>';
         $result .= '<div class="koowa-collapsed">';
         foreach (call_user_func($config->resources[$type], $var) as $key => $value) {
             $result .= '<span class="koowa-dump-indent">   ' . str_repeat('|  ', $level) . '</span>';
             $result .= '<span class="koowa-dump-key">' . StringEscaper::html($key) . "</span> => " . $this->_dumpVar($value, $config, $level + 1);
         }
         $result .= '</div>';
         return $result;
     }
     $result .= "\n";
     return $result;
 }
コード例 #2
0
ファイル: title.php プロジェクト: nooku/nooku-framework
 /**
  * Render the tag
  *
  * @param   array   $attribs Associative array of attributes
  * @param   string  $content The tag content
  * @return string
  */
 protected function _renderTag($attribs = array(), $content = null)
 {
     unset($attribs['content']);
     unset($attribs['separator']);
     $attribs = $this->buildAttributes($attribs);
     if ($this->getConfig()->escape) {
         $content = StringEscaper::html($content);
     }
     $html = '<title ' . $attribs . '>' . $content . '</title>' . "\n";
     return $html;
 }