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

$type

$type : string

Media type

Type

string

$condition

$condition : string

Media condition

Type

string

$features

$features : array

Media features

Type

array

$tabSize

$tabSize : integer

Tab size

Type

integer

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

__construct()

__construct(string  $type = null, array  $features = null, string  $condition = null, integer  $tabSize = 4) 

Constructor

Instantiate the CSS media object

Parameters

string $type
array $features
string $condition
integer $tabSize

setType()

setType(string  $type) : self

Set type

Parameters

string $type

Returns

self

getType()

getType() : string

Get type

Returns

string

setCondition()

setCondition(string  $condition = null) : self

Set condition

Parameters

string $condition

Returns

self

getCondition()

getCondition() : string

Get condition

Returns

string

setTabSize()

setTabSize(integer  $tabSize) : self

Set tab size

Parameters

integer $tabSize

Returns

self

getTabSize()

getTabSize() : integer

Get tab size

Returns

integer

setFeatures()

setFeatures(array  $features) : self

Set features

Parameters

array $features

Returns

self

getFeatures()

getFeatures() : array

Get features

Returns

array

setFeature()

setFeature(string  $feature, string  $value) : self

Set feature

Parameters

string $feature
string $value

Returns

self

getFeature()

getFeature(string  $feature) : string

Get feature

Parameters

string $feature

Returns

string

hasFeature()

hasFeature(string  $feature) : boolean

Does media query have feature

Parameters

string $feature

Returns

boolean

render()

render() : string

Method to render the selector CSS

Returns

string

__toString()

__toString() : string

To string method

Returns

string