コード例 #1
0
 /**
  * @return CL_Output
  */
 public static function get_instance()
 {
     if (self::$instance === NULL) {
         self::$instance = new CL_Output();
     }
     return self::$instance;
 }
コード例 #2
0
function attribute_edit_template(AttributeModel $attr)
{
    $o = CL_Output::get_instance();
    $l = CL_Loader::get_instance();
    $o->assign('attr', $attr);
    $folder = 'attribut_edit/';
    $path = APPPATH . 'views/' . $folder;
    if (file_exists($path . $attr->get_type_ID() . '.php')) {
        return $l->view($folder . $attr->get_type_ID(), FALSE);
    }
    return $l->view($folder . 'default', FALSE);
}
コード例 #3
0
 private function CL_Loader()
 {
     $this->out = CL_Output::get_instance();
 }
コード例 #4
0
ファイル: CodeLite.php プロジェクト: stefda/pocketsail
 */
function __autoload($name)
{
    require_once SYSPATH . 'libraries/' . $name . '.php';
}
/* * ***************************************************************
 * Load the Common functions file
 */
require_once SYSPATH . 'codelite/Common.php';
set_error_handler('error_handler');
set_exception_handler('exception_handler');
/* * ***************************************************************
 * Load some classes
 */
$router = CL_Router::get_instance();
$out = CL_Output::get_instance();
/* * ***************************************************************
 * Retrieve class and method
 */
$class = $router->fetch_class();
$method = $router->fetch_method();
$parameters = $router->fetch_parameters();
if (!controller_exists($class)) {
    header('HTTP/1.0 404 Not Found');
    show_error("Controller {$class} not found.", 'Controller Error');
}
require_once APPPATH . 'controllers/' . $class . '.php';
if (!controller_is_callable($class, $method)) {
    header('HTTP/1.0 404 Not Found');
    show_error("Requested controller {$class}/{$method} is not callable. Does the method <b>{$method}</b> exist?", "Controller Error");
}
コード例 #5
0
 /**
  * Assigns a javascript snippet with the given variables to the output. The
  * snippet is then sent to the browser along with other views so that the
  * views loaded after calling this function can use the variables in it.
  *
  * @param array $vars
  */
 protected function assign_js($vars)
 {
     $this->out->assign_js($vars);
 }
コード例 #6
0
function tpl_assign_var($name, $value)
{
    CL_Output::get_instance()->assign($name, $value);
}
コード例 #7
0
ファイル: CL_Loader.php プロジェクト: stefda/pocketsail
 private function __construct()
 {
     $this->out = CL_Output::get_instance();
 }