public function beforeOutput() {
        if (!($this->response instanceof jResponseHtml))
            return;

        $conf = &jApp::config()->jResponseHtml;
        $basePath = jApp::urlBasePath();
        if (isset($conf['minifyCSS']) && $conf['minifyCSS']) {
            if (isset($conf['minifyExcludeCSS']) && $conf['minifyExcludeCSS']) {
                $this->excludeCSS = preg_split( '/\s*,\s*/', $conf['minifyExcludeCSS'] );
                foreach($this->excludeCSS as $k=>$url) {
                    if (substr($url,0,1) != '/')
                        $this->excludeCSS[$k]= $basePath.$url;
                }
            }

            $this->response->setCSSLinks($this->generateMinifyList($this->response->getCSSLinks(), 'excludeCSS'));
            $this->response->setCSSIELinks($this->generateMinifyList($this->response->getCSSIELinks(), 'excludeCSS'));
        }

        if (isset($conf['minifyJS']) && $conf['minifyJS']) {
            if(isset($conf['minifyExcludeJS']) && $conf['minifyExcludeJS'] ) {
                $this->excludeJS = preg_split( '/\s*,\s*/', $conf['minifyExcludeJS'] );
                foreach($this->excludeJS as $k=>$url) {
                    if (substr($url,0,1) != '/')
                        $this->excludeJS[$k]= $basePath.$url;
                }
            }
            $this->response->setJSLinks($this->generateMinifyList($this->response->getJSLinks(), 'excludeJS'));
            $this->response->setJSIELinks($this->generateMinifyList($this->response->getJSIELinks(), 'excludeJS'));
        }
    }
public function beforeOutput() {
        if (!($this->response instanceof jResponseHtml))
            return;

        $conf = &jApp::config()->jResponseHtml;
        $basePath = jApp::urlBasePath();
        if (isset($conf['minifyCSS']) && $conf['minifyCSS']) {
            if (isset($conf['minifyExcludeCSS']) && $conf['minifyExcludeCSS']) {
                $this->excludeCSS = preg_split( '/\s*,\s*/', $conf['minifyExcludeCSS'] );
                foreach($this->excludeCSS as $k=>$url) {
                    if (substr($url,0,1) != '/')
                        $this->excludeCSS[$k]= $basePath.$url;
                }
            }

            $this->response->setCSSLinks($this->generateMinifyList($this->response->getCSSLinks(), 'excludeCSS'));
            $this->response->setCSSIELinks($this->generateMinifyList($this->response->getCSSIELinks(), 'excludeCSS'));
        }

        if (isset($conf['minifyJS']) && $conf['minifyJS']) {
            if(isset($conf['minifyExcludeJS']) && $conf['minifyExcludeJS'] ) {
                $this->excludeJS = preg_split( '/\s*,\s*/', $conf['minifyExcludeJS'] );
                foreach($this->excludeJS as $k=>$url) {
                    if (substr($url,0,1) != '/')
                        $this->excludeJS[$k]= $basePath.$url;
                }
            }
            $this->response->setJSLinks($this->generateMinifyList($this->response->getJSLinks(), 'excludeJS'));
            $this->response->setJSIELinks($this->generateMinifyList($this->response->getJSIELinks(), 'excludeJS'));
        }
    }
public function beforeOutput ( ) { if ( ! ( $ this -> response instanceof jResponseHtml ) ) return ; $ conf = & jApp :: config ( ) -> jResponseHtml ; $ basePath = jApp :: urlBasePath ( ) ; if ( isset ( $ conf [ 'minifyCSS' ] ) && $ conf [ 'minifyCSS' ] ) { if ( isset ( $ conf [ 'minifyExcludeCSS' ] ) && $ conf [ 'minifyExcludeCSS' ] ) { $ this -> excludeCSS = preg_split ( '/\s*,\s*/' , $ conf [ 'minifyExcludeCSS' ] ) ; foreach ( $ this -> excludeCSS as $ k => $ url ) { if ( substr ( $ url , 0 , 1 ) != '/' ) $ this -> excludeCSS [ $ k ] = $ basePath . $ url ; } } $ this -> response -> setCSSLinks ( $ this -> generateMinifyList ( $ this -> response -> getCSSLinks ( ) , 'excludeCSS' ) ) ; $ this -> response -> setCSSIELinks ( $ this -> generateMinifyList ( $ this -> response -> getCSSIELinks ( ) , 'excludeCSS' ) ) ; } if ( isset ( $ conf [ 'minifyJS' ] ) && $ conf [ 'minifyJS' ] ) { if ( isset ( $ conf [ 'minifyExcludeJS' ] ) && $ conf [ 'minifyExcludeJS' ] ) { $ this -> excludeJS = preg_split ( '/\s*,\s*/' , $ conf [ 'minifyExcludeJS' ] ) ; foreach ( $ this -> excludeJS as $ k => $ url ) { if ( substr ( $ url , 0 , 1 ) != '/' ) $ this -> excludeJS [ $ k ] = $ basePath . $ url ; } } $ this -> response -> setJSLinks ( $ this -> generateMinifyList ( $ this -> response -> getJSLinks ( ) , 'excludeJS' ) ) ; $ this -> response -> setJSIELinks ( $ this -> generateMinifyList ( $ this -> response -> getJSIELinks ( ) , 'excludeJS' ) ) ; } }
called when the content is generated, and potentially sent, except
the body end tag and the html end tags. This method can output
directly some contents.
called when the content is generated and potentially sent except the body end tag and the html end tags . This method can output directly some contents .