CWIS Developer Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
scss_server Class Reference

SCSS server. More...

Public Member Functions

 serve ($salt= '')
 Compile requested scss and serve css. More...
 
 __construct ($dir, $cacheDir=null, $scss=null)
 Constructor. More...
 

Static Public Member Functions

static serveFrom ($path)
 Helper method to serve compiled scss. More...
 

Protected Member Functions

 join ($left, $right)
 Join path components. More...
 
 inputName ()
 Get name of requested .scss file. More...
 
 findInput ()
 Get path to requested .scss file. More...
 
 cacheName ($fname)
 Get path to cached .css file. More...
 
 importsCacheName ($out)
 Get path to cached imports. More...
 
 needsCompile ($in, $out)
 Determine whether .scss file needs to be re-compiled. More...
 
 getModifiedSinceHeader ()
 Get If-Modified-Since header from client request. More...
 
 compile ($in, $out)
 Compile .scss file. More...
 

Detailed Description

SCSS server.

Author
Leaf Corcoran leafo.nosp@m.t@gm.nosp@m.ail.c.nosp@m.om

Definition at line 4346 of file scssc.php.

Constructor & Destructor Documentation

scss_server::__construct (   $dir,
  $cacheDir = null,
  $scss = null 
)

Constructor.

Parameters
string$dirRoot directory to .scss files
string$cacheDirCache directory
\scssc | null$scssSCSS compiler instance

Definition at line 4548 of file scssc.php.

Member Function Documentation

scss_server::cacheName (   $fname)
protected

Get path to cached .css file.

Returns
string

Definition at line 4400 of file scssc.php.

scss_server::compile (   $in,
  $out 
)
protected

Compile .scss file.

Parameters
string$inInput path (.scss)
string$outOutput path (.css)
Returns
string

Definition at line 4466 of file scssc.php.

References scssc\$VERSION.

scss_server::findInput ( )
protected

Get path to requested .scss file.

Returns
string

Definition at line 4380 of file scssc.php.

scss_server::getModifiedSinceHeader ( )
protected

Get If-Modified-Since header from client request.

Returns
string

Definition at line 4443 of file scssc.php.

scss_server::importsCacheName (   $out)
protected

Get path to cached imports.

Returns
string

Definition at line 4409 of file scssc.php.

scss_server::inputName ( )
protected

Get name of requested .scss file.

Returns
string|null

Definition at line 4364 of file scssc.php.

scss_server::join (   $left,
  $right 
)
protected

Join path components.

Parameters
string$leftPath component, left of the directory separator
string$rightPath component, right of the directory separator
Returns
string

Definition at line 4355 of file scssc.php.

scss_server::needsCompile (   $in,
  $out 
)
protected

Determine whether .scss file needs to be re-compiled.

Parameters
string$inInput path
string$outOutput path
Returns
boolean True if compile required.

Definition at line 4421 of file scssc.php.

scss_server::serve (   $salt = '')

Compile requested scss and serve css.

Outputs HTTP response.

Parameters
string$saltPrefix a string to the filename for creating the cache name hash

Definition at line 4486 of file scssc.php.

References scssc\$VERSION, and scssc\compile().

static scss_server::serveFrom (   $path)
static

Helper method to serve compiled scss.

Parameters
string$pathRoot path

Definition at line 4570 of file scssc.php.


The documentation for this class was generated from the following file: