public function script($src, $version=false){

        $list = [];

        foreach((array)$src as $script) {

            $type = 'text/javascript';
            $src  = $script;
            $load = '';

            if (is_array($script)) {
                extract($script);
            }

            $ispath = strpos($src, ':') !== false && !preg_match('#^(|http\:|https\:)//#', $src);
            $list[] = '<script src="'.($ispath ? $this->pathToUrl($src):$src).($version ? "?ver={$version}":"").'" type="'.$type.'" '.$load.'></script>';
        }

        return implode("\n", $list);
    }
public function script($src, $version=false){

        $list = [];

        foreach((array)$src as $script) {

            $type = 'text/javascript';
            $src  = $script;
            $load = '';

            if (is_array($script)) {
                extract($script);
            }

            $ispath = strpos($src, ':') !== false && !preg_match('#^(|http\:|https\:)//#', $src);
            $list[] = '<script src="'.($ispath ? $this->pathToUrl($src):$src).($version ? "?ver={$version}":"").'" type="'.$type.'" '.$load.'></script>';
        }

        return implode("\n", $list);
    }
public function script ( $ src , $ version = false ) { $ list = [ ] ; foreach ( ( array ) $ src as $ script ) { $ type = 'text/javascript' ; $ src = $ script ; $ load = '' ; if ( is_array ( $ script ) ) { extract ( $ script ) ; } $ ispath = strpos ( $ src , ':' ) !== false && ! preg_match ( '#^(|http\:|https\:)//#' , $ src ) ; $ list [ ] = '<script src="' . ( $ ispath ? $ this -> pathToUrl ( $ src ) : $ src ) . ( $ version ? "?ver={$version}" : "" ) . '" type="' . $ type . '" ' . $ load . '></script>' ; } return implode ( "\n" , $ list ) ; }
Get script inc. markup
@param  String $src
@return String
Get script inc . markup