This documentation is generated from PHPDOC.
__construct | public | __construct( constructor @param array $aOptions with possible keys - debug - vendordir & vendorurl - vendorrelpath | |
_wd | protected | _wd( write debug output if the flag was set @param string $sText message to show | |
_getLocalfilename | protected | _getLocalfilename( return the local filename (maybe it does not exist) @param string $sRelUrl relative url of css/ js file (i.e. "jquery/3.2.1/jquery.min.js") @return string | |
getLocalfile | public | getLocalfile( return the local filename if it exists @param string $sRelUrl relative url of css/ js file (i.e. "jquery/3.2.1/jquery.min.js") @return type | |
setCdn | public | setCdn( set a CDN to deliver sources; returns true if the CDN is supported; returns false if CDN is not supported @see getCdns() to get a list of supported CDNs @param string $sNewCdn @return boolean | |
setDebug | public | setDebug( set a vendor url to use as link for libraries @param string $sNewValue new url @return string | |
setVendorWithRelpath | public | setVendorWithRelpath( set a vendor dir to scan libraries as relative path to the class @param string $sNewValue new local dir; relative to the class file @return string | |
setVendorDir | public | setVendorDir( set a vendor dir to scan libraries as full path @param string $sNewValue new local dir; absolute path @param boolean $bMustExist optional flag: ensure that the directory exists @return string | |
setVendorUrl | public | setVendorUrl( set a vendor url to use as link for libraries @param string $sNewValue new url @return string | |
addLib | public | addLib( add a library into lib stack @param string $sReldir relative dir and version (i.e. "jquery/3.2.1") @param string $sFile optional file (behind relpath) @return boolean | |
getCdns | public | getCdns() get array with a flat list of supported CDNs @return array | |
getCurrentCdn | public | getCurrentCdn() get array with a flat list of supported CDNs @return array | |
getFilteredLibs | public | getFilteredLibs( return array of all libs filtered by criteria @example get used libs that are local: $oCdn->getFilteredLibs(array('islocal'=>1)); get used libs that are loaded from CDN: $oCdn->getFilteredLibs(array('islocal'=>0)); get unused libs that are still local (and can be deleted) $oCdn->getFilteredLibs(array('islocal'=>1, 'isunused'=>1)) @param array $aFilter array with filter items containing these keys: - islocal true|false; default is false - isunused true|false; default is false @return array | |
getLibs | public | getLibs( return all libs from lib stack; with enabled flag entries in local vendor cache will be added to show the versions that can be deleted (detectable by subkey "isunused" => true) @param boolean $bDetectUnused flag: detect unused local libs @return array | |
_getLibItem | public | _getLibItem( find item with a value and return other value @param string $sScanItem item to search (one of lib|version|relpath) @param $sReldir$sScanValue needed value @param $sReldir$sReturnKey return key (one of lib|version|relpath) @return varia | |
getLibVersion | public | getLibVersion( get the (first) version of a lib in the lib stack @param string $sLib name of the library (i.e. "jquery"; relpath without version) @return string | |
getLibRelpath | public | getLibRelpath( get the (first) version of a lib in the lib stack @param string $sLib name of the library (i.e. "jquery"; relpath without version) @return string | |
setLibs | public | setLibs( set an array of lib items to the lib @param array $aLibs array of relpath (i.e. "jquery/3.2.1") @return boolean | |
_splitRelUrl | protected | _splitRelUrl( | |
getFullCdnUrl | public | getFullCdnUrl( | |
getFullUrl | public | getFullUrl( get full url based on relative filename. It returns the url of local directory if it exists or a url of CDNJS To use a local path a library must exist. Default vendor dir is '[webroot]/vendor' and vendor url is '/vendor' Use the setVendor* functions to override them. @see setVendorDir() @see setVendorUrl() or @see setVendorWithRelpath() @param string $sRelUrl relative url of css/ js file (i.e. "jquery/3.2.1/jquery.min.js") @return type | |
getHtmlInclude | public | getHtmlInclude( get html code to include a css or js file (kind of lazy function) Remark: other file extensions are not supported Use the method getFullUrl() to get a full url and then embed it directly @see getFullUrl() @param string $sRelUrl relative url of css/ js file (i.e. "jquery/3.2.1/jquery.min.js") @return string |
$_bDebug | public | $_bDebug = false flag to show debugging infos (used in _wd method [write debug]) @var boolean |
$sVendorDir | public | $sVendorDir = false local vendor dir ... if a lib was downloaded with admin @var string |
$sVendorUrl | public | $sVendorUrl = false local vendor url ... if a lib was downloaded with admin this is the prefix for linking in html documents @var string |
$sCdnUrl | public | $sCdnUrl = https://cdnjs.cloudflare.com/ajax/libs url prefix of CDNJS @var string |
$aCdnUrls | public | $aCdnUrls = Array ( [cdnjs.cloudflare.com] => Array ( [about] => [url] => https://cdnjs.cloudflare.com/ajax/libs/[PKG]/[VERSION]/[FILE] [urlLatest] => https://cdnjs.cloudflare.com/ajax/libs/[PKG]/[VERSION]/[FILE] ) ) |
$_sCdn | protected | $_sCdn = false |
$_aLibs | public | $_aLibs = false |