public static function display($layout = 'horizontal', $manual_content_tweet = '')
 {
     $class = new self();
     $class->set_layout($layout);
     $class->set_manual_content_tweet($manual_content_tweet);
     return $class->display();
 }
Example #2
0
 public static function quickStart()
 {
     $Loader = new self();
     $Loader->init();
     $Loader->display();
     return $Loader;
 }
 /**
  * Render content quickly
  *
  * @param  string $root
  * @param  string $template
  * @param  array  $env
  * @return string
  */
 public static function quick($root, $template, array $env = array())
 {
     $T = new self($root);
     $T->set($env);
     ob_start();
     $T->display($template);
     return ob_get_clean();
 }
 public static function display($width = 450, $show_faces = true, $layout = 'standard', $action = 'like', $color_scheme = 'like', $send_button = false)
 {
     $class = new self();
     $class->set_width($width);
     $class->set_show_faces($show_faces);
     $class->set_layout($layout);
     $class->set_action($action);
     $class->set_color_scheme($color_scheme);
     $class->set_send_button($send_button);
     return $class->display();
 }
 public static function display($size = 'standard')
 {
     $class = new self();
     $class->set_size($size);
     return $class->display();
 }
Example #6
0
 /**
  * Generate a view from a string
  *
  * @param string $content The string of the origin template
  * @param array  $data    The data to apply to the view
  *
  * @return string The HTML result of the string
  */
 public static function makeFromString($content, $data = array())
 {
     $file = tempnam(TMP_DIR, '');
     file_put_contents($file, $content);
     // calculate the view
     $view = new self($file);
     $view->setData($data);
     $result = $view->display();
     // Remove temporary files
     unlink($file);
     App::cache()->clear($view->cacheFile);
     return $result;
 }
Example #7
0
 /**
  * 404页面优化
  */
 public static function _404()
 {
     //清除缓冲区的所有输出
     ob_end_clean();
     header("HTTP/1.0 404 Not Found");
     header("status: 404 Not Found");
     $my = new self();
     $my->display('public/404');
     exit;
 }