ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
page_css_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| join_stylesheets ($Files)
| compile_stylesheets (&$Settings)
| add_stylesheet ($Path, $Join=false)

## Data Fields
| $CSSFiles = array()
| $Cache = false
| $CachedMultyFS = false
| $PageComposer = false
| $Security = false
| $String = false
| $Tags = false
| $Trace = false

## Detailed Description

Page composer utilities.

Author
  Dodonov A.A.

Definition at line 26 of file page_css.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 68 of file page_css.php.

{
try
{
$this->Cache = get_package( 'cache' , 'last' , __FILE__ );
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
$this->Tags = get_package( 'string::tags' , 'last' , __FILE__ );
$this->Trace = get_package( 'trace' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

add_stylesheet | ( |  | $Path,
|  |  | $Join = `false`
| ) |  |

Function adds stylesheet to include queue.

Parameters

  $Path | - Path to the stylesheet.
  $Join | - Should this stylesheet be joined with others.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 498 of file page_css.php.

{
try
{
if( $this->PageComposer === false )
{
$this->PageComposer = get_package( 'page::page_composer' , 'last' , __FILE__ );
}
$Path = $this->PageComposer->Template->compile_string( $Path );
$Path = str_replace( '/./' , '/' , $Path );
foreach( $this->CSSFiles as $k => $v )
{
if( $v[ 'path' ] == $Path )
{
return;
}
}
$this->CSSFiles [] = array( 'path' => $Path , 'join' => $Join );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_stylesheets | ( | & | $Settings | ) |

Function outputs style sheets.

Parameters

  $Settings | - Settings.

Returns
  Stylesheets.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 455 of file page_css.php.

{
try
{
$Content = '';
if( is_array( $this->CSSFiles ) && count( $this->CSSFiles ) )
{
$Content = $this->get_stylesheets_content();
}
$this->CSSFiles = array();
return( $Content );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

join_stylesheets | ( |  | $Files | ) |

Function unites stylesheets.

Parameters

  $Files | - Array of files to unite.

Returns
  Array of files after the union.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 375 of file page_css.php.

{
try
{
if( is_array( $Files ) && count( $Files ) > 0 )
{
$Compressed = $this->compress_stylesheets( $Files );
$RetFiles = $this->join_compressed_stylesheets( $Compressed );
return( $RetFiles );
}
else
{
return( $Files );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$Cache = false

Cached object.

Author
  Dodonov A.A.

Definition at line 50 of file page_css.php.

$CachedMultyFS = false

Definition at line 51 of file page_css.php.

$CSSFiles = array()

Array keeps all file paths to be included.

Author
  Dodonov A.A.

Definition at line 38 of file page_css.php.

$PageComposer = false

Definition at line 52 of file page_css.php.

$Security = false

Definition at line 53 of file page_css.php.

$String = false

Definition at line 54 of file page_css.php.

$Tags = false

Definition at line 55 of file page_css.php.

$Trace = false

Definition at line 56 of file page_css.php.

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

- packages/page/packages/page_css/page_css.php