src/View/Requirements_Backend.php
public function includeInResponse(HTTPResponse $response)
    {
        $this->processCombinedFiles();
        $jsRequirements = array();
        $cssRequirements = array();

        foreach ($this->getJavascript() as $file => $attributes) {
            $path = $this->pathForFile($file);
            if ($path) {
                $jsRequirements[] = str_replace(',', '%2C', $path);
            }
        }

        if (count($jsRequirements)) {
            $response->addHeader('X-Include-JS', implode(',', $jsRequirements));
        }

        foreach ($this->getCSS() as $file => $params) {
            $path = $this->pathForFile($file);
            if ($path) {
                $path = str_replace(',', '%2C', $path);
                $cssRequirements[] = isset($params['media']) ? "$path:##:$params[media]" : $path;
            }
        }

        if (count($cssRequirements)) {
            $response->addHeader('X-Include-CSS', implode(',', $cssRequirements));
        }
    }
public function includeInResponse(HTTPResponse $response)
    {
        $this->processCombinedFiles();
        $jsRequirements = array();
        $cssRequirements = array();

        foreach ($this->getJavascript() as $file => $attributes) {
            $path = $this->pathForFile($file);
            if ($path) {
                $jsRequirements[] = str_replace(',', '%2C', $path);
            }
        }

        if (count($jsRequirements)) {
            $response->addHeader('X-Include-JS', implode(',', $jsRequirements));
        }

        foreach ($this->getCSS() as $file => $params) {
            $path = $this->pathForFile($file);
            if ($path) {
                $path = str_replace(',', '%2C', $path);
                $cssRequirements[] = isset($params['media']) ? "$path:##:$params[media]" : $path;
            }
        }

        if (count($cssRequirements)) {
            $response->addHeader('X-Include-CSS', implode(',', $cssRequirements));
        }
    }
public function includeInResponse ( HTTPResponse $ response ) { $ this -> processCombinedFiles ( ) ; $ jsRequirements = array ( ) ; $ cssRequirements = array ( ) ; foreach ( $ this -> getJavascript ( ) as $ file => $ attributes ) { $ path = $ this -> pathForFile ( $ file ) ; if ( $ path ) { $ jsRequirements [ ] = str_replace ( ',' , '%2C' , $ path ) ; } } if ( count ( $ jsRequirements ) ) { $ response -> addHeader ( 'X-Include-JS' , implode ( ',' , $ jsRequirements ) ) ; } foreach ( $ this -> getCSS ( ) as $ file => $ params ) { $ path = $ this -> pathForFile ( $ file ) ; if ( $ path ) { $ path = str_replace ( ',' , '%2C' , $ path ) ; $ cssRequirements [ ] = isset ( $ params [ 'media' ] ) ? "$path:##:$params[media]" : $ path ; } } if ( count ( $ cssRequirements ) ) { $ response -> addHeader ( 'X-Include-CSS' , implode ( ',' , $ cssRequirements ) ) ; } }
Attach requirements inclusion to X-Include-JS and X-Include-CSS headers on the given
HTTP Response

@param HTTPResponse $response
Attach requirements inclusion to X - Include - JS and X - Include - CSS headers on the given HTTP Response