PHP 클래스 Tollwerk\Squeezr\Css

부터: 1.0b
저자: Joschi Kuphal ([email protected])
상속: extends Tollwerk\Squeezr
파일 보기 프로젝트 열기: jkphl/squeezr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_absoluteCacheCssDir string Parent directory of cached CSS file (absolute path)
$_absoluteCacheCssPath string Cached CSS file (absolute path)
$_absoluteCachePathBase string Base path for all cache files
$_absoluteCachePhpPath string Cached CSS file (absolute path)
$_absoluteCssPath string Requested CSS file (absolute path)
$_blocks array CSS Blocks
$_breakpointCatalog array Media Query condition catalog
$_breakpointIndex array Media Query condition index
$_breakpointTypes array Breakpoint types
$_importPatterns array Import at-rule patterns
$_lines array Line lengths
$_minifier Tollwerk\Squeezr\Css\Minifier Minification provider
$_relativeCssPath string Requested CSS file (relative path to document root)

공개 메소드들

메소드 설명
instance ( string $css ) : Css Instanciate a CSS proxy
send ( boolean $cache = true ) : void Parse, squeeze and send the CSS file to the client

보호된 메소드들

메소드 설명
__construct ( string $css ) Constructor
_breakpointIndex ( integer $type, array $condition ) : integer Determine / create and return a breakpoint index entry
_breakpoints ( string $mediaQuery ) : array | null Extract the relevant breakpoints out of a @media query
_compileCacheClassCode ( ) : string Compile a PHP cache class representing the loaded CSS stylesheet
_consumeDeclarationBlock ( string $css, integer $peek, integer $offset, integer &$declarationBlockStart ) : string Detect and consume a declaration block within the given CSS text
_minify ( string $css ) : string Minifiy a CSS block (in case a minification provider has been registered)
_parse ( ) Parse and analyze the requested CSS file
_peekToLine ( integer $peek ) : integer Find the line number corresponding with a peek position within the CSS file
_registerBlock ( string &$block, array $breakpoints = null ) Register block data

메소드 상세

__construct() 보호된 메소드

Constructor
protected __construct ( string $css )
$css string Requested CSS file (relative to document root)

_breakpointIndex() 보호된 메소드

Determine / create and return a breakpoint index entry
protected _breakpointIndex ( integer $type, array $condition ) : integer
$type integer Breakpoint type
$condition array Condition values
리턴 integer Breakpoint index

_breakpoints() 보호된 메소드

Extract the relevant breakpoints out of a @media query
protected _breakpoints ( string $mediaQuery ) : array | null
$mediaQuery string @media query
리턴 array | null Breakpoint alternatives

_compileCacheClassCode() 보호된 메소드

Compile a PHP cache class representing the loaded CSS stylesheet
protected _compileCacheClassCode ( ) : string
리턴 string PHP class code

_consumeDeclarationBlock() 보호된 메소드

Detect and consume a declaration block within the given CSS text
protected _consumeDeclarationBlock ( string $css, integer $peek, integer $offset, integer &$declarationBlockStart ) : string
$css string CSS text
$peek integer Current peek (for line number detection in case of an error)
$offset integer Optional: Offset position
$declarationBlockStart integer Set by reference: Declaration block start position within the CSS text
리턴 string Declaration block (starting at the beginning of the CSS text)

_minify() 보호된 메소드

Minifiy a CSS block (in case a minification provider has been registered)
protected _minify ( string $css ) : string
$css string CSS block
리턴 string Minified CSS block

_parse() 보호된 메소드

Parse and analyze the requested CSS file
protected _parse ( )

_peekToLine() 보호된 메소드

Find the line number corresponding with a peek position within the CSS file
protected _peekToLine ( integer $peek ) : integer
$peek integer Peek position
리턴 integer Line number

_registerBlock() 보호된 메소드

Register block data
protected _registerBlock ( string &$block, array $breakpoints = null )
$block string Block data
$breakpoints array Breakpoints

instance() 공개 정적인 메소드

Instanciate a CSS proxy
public static instance ( string $css ) : Css
$css string CSS file
리턴 Css Instance reference

send() 공개 메소드

Parse, squeeze and send the CSS file to the client
public send ( boolean $cache = true ) : void
$cache boolean Cache a copy of the parsed CSS stylesheet
리턴 void

프로퍼티 상세

$_absoluteCacheCssDir 보호되어 있는 프로퍼티

Parent directory of cached CSS file (absolute path)
protected string $_absoluteCacheCssDir
리턴 string

$_absoluteCacheCssPath 보호되어 있는 프로퍼티

Cached CSS file (absolute path)
protected string $_absoluteCacheCssPath
리턴 string

$_absoluteCachePathBase 보호되어 있는 프로퍼티

Base path for all cache files
protected string $_absoluteCachePathBase
리턴 string

$_absoluteCachePhpPath 보호되어 있는 프로퍼티

Cached CSS file (absolute path)
protected string $_absoluteCachePhpPath
리턴 string

$_absoluteCssPath 보호되어 있는 프로퍼티

Requested CSS file (absolute path)
protected string $_absoluteCssPath
리턴 string

$_blocks 보호되어 있는 프로퍼티

CSS Blocks
protected array $_blocks
리턴 array

$_breakpointCatalog 보호되어 있는 프로퍼티

Media Query condition catalog
protected array $_breakpointCatalog
리턴 array

$_breakpointIndex 보호되어 있는 프로퍼티

Media Query condition index
protected array $_breakpointIndex
리턴 array

$_breakpointTypes 보호되어 있는 정적으로 프로퍼티

Breakpoint types
protected static array $_breakpointTypes
리턴 array

$_importPatterns 보호되어 있는 정적으로 프로퍼티

Import at-rule patterns
protected static array $_importPatterns
리턴 array

$_lines 보호되어 있는 프로퍼티

Line lengths
protected array $_lines
리턴 array

$_minifier 보호되어 있는 프로퍼티

Minification provider
protected Minifier,Tollwerk\Squeezr\Css $_minifier
리턴 Tollwerk\Squeezr\Css\Minifier

$_relativeCssPath 보호되어 있는 프로퍼티

Requested CSS file (relative path to document root)
protected string $_relativeCssPath
리턴 string