public function getBuildContents($mimeType, $language)
    {
        if ($mimeType == 'text/javascript') $ext = 'js';
        else if ($mimeType == 'text/javascript; defer') $ext = 'defer.js';
        else if ($mimeType == 'text/css') $ext = 'css';

        $cacheId = Kwf_Assets_Dispatcher::getInstance()->getCacheIdByPackage($this, $ext, $language);
        $ret = Kwf_Assets_BuildCache::getInstance()->load($cacheId);
        if ($ret === false || $ret === 'outdated') {
            if ($ret === 'outdated' && Kwf_Config::getValue('assets.lazyBuild') == 'outdated') {
                Kwf_Assets_BuildCache::getInstance()->building = true;
            } else if (Kwf_Config::getValue('assets.lazyBuild') !== true) {
                if (Kwf_Exception_Abstract::isDebug()) {
                    //proper error message on development server
                    throw new Kwf_Exception("Building assets is disabled (assets.lazyBuild). Please include package in build.");
                } else {
                    throw new Kwf_Exception_NotFound();
                }
            }
            $ret = $this->getPackageContents($mimeType, $language)->getFileContents();
            Kwf_Assets_BuildCache::getInstance()->building = false;
        } else {
            $ret = $ret['contents'];
        }
        return $ret;
    }
public function getBuildContents($mimeType, $language)
    {
        if ($mimeType == 'text/javascript') $ext = 'js';
        else if ($mimeType == 'text/javascript; defer') $ext = 'defer.js';
        else if ($mimeType == 'text/css') $ext = 'css';

        $cacheId = Kwf_Assets_Dispatcher::getInstance()->getCacheIdByPackage($this, $ext, $language);
        $ret = Kwf_Assets_BuildCache::getInstance()->load($cacheId);
        if ($ret === false || $ret === 'outdated') {
            if ($ret === 'outdated' && Kwf_Config::getValue('assets.lazyBuild') == 'outdated') {
                Kwf_Assets_BuildCache::getInstance()->building = true;
            } else if (Kwf_Config::getValue('assets.lazyBuild') !== true) {
                if (Kwf_Exception_Abstract::isDebug()) {
                    //proper error message on development server
                    throw new Kwf_Exception("Building assets is disabled (assets.lazyBuild). Please include package in build.");
                } else {
                    throw new Kwf_Exception_NotFound();
                }
            }
            $ret = $this->getPackageContents($mimeType, $language)->getFileContents();
            Kwf_Assets_BuildCache::getInstance()->building = false;
        } else {
            $ret = $ret['contents'];
        }
        return $ret;
    }
public function getBuildContents ( $ mimeType , $ language ) { if ( $ mimeType == 'text/javascript' ) $ ext = 'js' ; else if ( $ mimeType == 'text/javascript; defer' ) $ ext = 'defer.js' ; else if ( $ mimeType == 'text/css' ) $ ext = 'css' ; $ cacheId = Kwf_Assets_Dispatcher :: getInstance ( ) -> getCacheIdByPackage ( $ this , $ ext , $ language ) ; $ ret = Kwf_Assets_BuildCache :: getInstance ( ) -> load ( $ cacheId ) ; if ( $ ret === false || $ ret === 'outdated' ) { if ( $ ret === 'outdated' && Kwf_Config :: getValue ( 'assets.lazyBuild' ) == 'outdated' ) { Kwf_Assets_BuildCache :: getInstance ( ) -> building = true ; } else if ( Kwf_Config :: getValue ( 'assets.lazyBuild' ) !== true ) { if ( Kwf_Exception_Abstract :: isDebug ( ) ) { //proper error message on development server throw new Kwf_Exception ( "Building assets is disabled (assets.lazyBuild). Please include package in build." ) ; } else { throw new Kwf_Exception_NotFound ( ) ; } } $ ret = $ this -> getPackageContents ( $ mimeType , $ language ) -> getFileContents ( ) ; Kwf_Assets_BuildCache :: getInstance ( ) -> building = false ; } else { $ ret = $ ret [ 'contents' ] ; } return $ ret ; }
Get built contents of a package, to be used by eg. mails
Get built contents of a package to be used by eg . mails