Properties

$selectors

$selectors : array

Selectors

Type

array

$elements

$elements : array

Elements

Type

array

$ids

$ids : array

IDs

Type

array

$classes

$classes : array

Classes

Type

array

$comments

$comments : array

Comments

Type

array

$minify

$minify : boolean

Minify flag

Type

boolean

$media

$media : array

Media queries

Type

array

Methods

addSelector()

addSelector(\Pop\Css\Selector  $selector) : self

Add CSS selector

Parameters

\Pop\Css\Selector $selector

Returns

self

addSelectors()

addSelectors(array  $selectors) : self

Add CSS selectors

Parameters

array $selectors

Returns

self

hasSelector()

hasSelector(string  $selector) : boolean

Check if the object has CSS selector

Parameters

string $selector

Returns

boolean

getSelector()

getSelector(string  $selector) : \Pop\Css\Selector

Get CSS selector

Parameters

string $selector

Returns

\Pop\Css\Selector

removeSelector()

removeSelector(string  $selector) : self

Get CSS selector

Parameters

string $selector

Returns

self

addComment()

addComment(\Pop\Css\Comment  $comment) : self

Add CSS comment

Parameters

\Pop\Css\Comment $comment

Returns

self

getComments()

getComments() : array

Get CSS comments

Returns

array

minify()

minify(boolean  $minify = true) : self

Set minify flag

Parameters

boolean $minify

Returns

self

isMinified()

isMinified() : boolean

Check if minify flag is set

Returns

boolean

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the properties

Returns

\ArrayIterator

count()

count() : integer

Method to get the count of properties

Returns

integer

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

Throws

\Pop\Css\Exception

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

addMedia()

addMedia(\Pop\Css\Media  $media) : self

Add media query

Parameters

\Pop\Css\Media $media

Returns

self

getMedia()

getMedia(integer  $i) : \Pop\Css\Media

Get media query by index

Parameters

integer $i

Returns

\Pop\Css\Media

getAllMedia()

getAllMedia() : array

Get all media queries

Returns

array

removeMedia()

removeMedia(integer  $i) : self

Remove media query by index

Parameters

integer $i

Returns

self

removeAllMedia()

removeAllMedia() : self

Remove all media queries

Returns

self

parseString()

parseString(string  $cssString) : self

Parse CSS string

Parameters

string $cssString

Returns

self

parseFile()

parseFile(string  $cssFile) : self

Parse CSS from file

Parameters

string $cssFile

Returns

self

parseUri()

parseUri(string  $cssUri) : self

Parse CSS from URI

Parameters

string $cssUri

Returns

self

parseCss()

parseCss(string  $cssString) : self

Parse CSS string

Parameters

string $cssString

Returns

self

parseCssFile()

parseCssFile(string  $cssFile) : self

Parse CSS string from file

Parameters

string $cssFile

Throws

\Pop\Css\Exception

Returns

self

parseCssUri()

parseCssUri(string  $cssUri) : self

Parse CSS string from URI

Parameters

string $cssUri

Returns

self

render()

render() : string

Method to render the selector CSS

Returns

string

__toString()

__toString() : string

To string method

Returns

string

parseSelectors()

parseSelectors(string  $cssString) : array

Method to parse the CSS selectors from a string

Parameters

string $cssString

Returns

array