CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 | $dir | Root directory to .scss files
  string | $cacheDir | Cache directory
  \scssc | null | $scss | SCSS compiler instance

Definition at line 4548 of file scssc.php.

References join().

## Member Function Documentation

scss_server::cacheName | ( |  | $fname | ) |
| protected

Get path to cached .css file.

Returns
  string

Definition at line 4400 of file scssc.php.

References join().

Referenced by serve().

Here is the caller graph for this function:

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

Compile .scss file.

Parameters

  string | $in | Input path (.scss)
  string | $out | Output path (.css)

Returns
  string

Definition at line 4466 of file scssc.php.

References scssc\$VERSION, and importsCacheName().

Referenced by serve().

Here is the caller graph for this function:

scss_server::findInput | ( |  | ) |
| protected

Get path to requested .scss file.

Returns
  string

Definition at line 4380 of file scssc.php.

References inputName(), and join().

Referenced by serve().

Here is the caller graph for this function:

scss_server::getModifiedSinceHeader | ( |  | ) |
| protected

Get If-Modified-Since header from client request.

Returns
  string

Definition at line 4443 of file scssc.php.

Referenced by serve().

Here is the caller graph for this function:

scss_server::importsCacheName | ( |  | $out | ) |
| protected

Get path to cached imports.

Returns
  string

Definition at line 4409 of file scssc.php.

Referenced by compile(), and needsCompile().

Here is the caller graph for this function:

scss_server::inputName | ( |  | ) |
| protected

Get name of requested .scss file.

Returns
  string|null

Definition at line 4364 of file scssc.php.

Referenced by findInput().

Here is the caller graph for this function:

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

Join path components.

Parameters

  string | $left | Path component, left of the directory separator
  string | $right | Path component, right of the directory separator

Returns
  string

Definition at line 4355 of file scssc.php.

Referenced by __construct(), cacheName(), and findInput().

Here is the caller graph for this function:

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

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

Parameters

  string | $in | Input path
  string | $out | Output path

Returns
  boolean True if compile required.

Definition at line 4421 of file scssc.php.

References importsCacheName().

Referenced by serve().

Here is the caller graph for this function:

scss_server::serve | ( |  | $salt = `''` | ) |

Compile requested scss and serve css.

Outputs HTTP response.

Parameters

  string | $salt | Prefix a string to the filename for creating the cache name hash

Definition at line 4486 of file scssc.php.

References scssc\$VERSION, cacheName(), compile(), findInput(), getModifiedSinceHeader(), and needsCompile().

static scss_server::serveFrom | ( |  | $path | ) |
| static

Helper method to serve compiled scss.

Parameters

  string | $path | Root path

Definition at line 4570 of file scssc.php.

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

- lib/ScoutLib/scssc.php