コード例 #1
0
ファイル: Tagmanager.php プロジェクト: pompalini/emngo
 /**
  * Displays an error concerning one tag use
  *
  * @param	FTL_Binding
  * @param	String		Message
  * @param	String		Error template
  *
  * @return	String		Error message
  *
  */
 protected static function show_tag_error(FTL_Binding $tag, $message, $template = 'error_tag')
 {
     // Build the tag string as written in the view
     $attributes = $tag->getAttributes();
     $attr_str = '';
     foreach ($attributes as $key => $value) {
         $attr_str .= ' ' . $key . '="' . $value . '"';
     }
     // Used by APPPATH.'errors/'.$template.EXT
     $tag_name = '<' . self::$tag_prefix . ':' . $tag->nesting() . ' ' . $attr_str . '>';
     ob_start();
     include APPPATH . 'errors/' . $template . EXT;
     $buffer = ob_get_contents();
     ob_end_clean();
     return $buffer;
 }