Example #1
0
 public static function script($href, $opt = [])
 {
     if (!$href) {
         return "";
     }
     $type = isset($opt["type"]) ? $opt["type"] : "text/javascript";
     if ($href[0] == "@") {
         list($name, $suffix) = explode("/", $href, 2);
         $prefix = \lasa\view\View::path(substr($name, 1));
         $href = $prefix . "/" . $suffix;
     }
     return '<script type="' . $type . '" src="' . $href . '"></script>';
 }
Example #2
0
function view_path($name, $path = null)
{
    return \lasa\view\View::path($name, $path);
}