class.compost.php
// Write the css / js to file for referencing
Write the css / js to file for referencing
Write the css / js to file for referencing
public function write($location="footer")
    {
        if ($this->debug) var_dump("WRITING");
        $output = '';
        if (! empty($this->heap[$location]))
        {
            if (! file_exists($this->paths('local', $location))){
                if ($this->debug) var_dump("WRITING FILE");
                $writen = file_put_contents(
                    $this->paths('local', $location),
                    $this->heap[$location]
                );
                if ($writen !== false) {
                    return $this->paths('uri', $location);
                }
            }
        }
        return $output;
    }
public function write ( $ location = " footer " ) { if ( $ this -> debug ) var_dump ( " WRITING " ) ; $ output = '' ; if ( ! empty ( $ this -> heap [ $ location ] ) ) { if ( ! file_exists ( $ this -> paths ( 'local' , $ location ) ) ) { if ( $ this -> debug ) var_dump ( " WRITING FILE " ) ; $ writen = file_put_contents ( $ this -> paths ( 'local' , $ location ) , $ this -> heap [ $ location ] ) ; if ( $ writen !== false ) { return $ this -> paths ( 'uri' , $ location ) ; } } } return $ output ; }
Write the css / js to file for referencing
Write the css / js to file for referencing
// Ensure that we have something to work with // This file has already been written, no need to re-write it again // Set the local file as well as the relative file // Ensure that we were able to write the content to the filesystem // Return either empty or the file name