Documentation

Media extends AbstractCss
in package

Pop CSS media class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.1.0

Table of Contents

$classes  : array<string|int, mixed>
Classes
$comments  : array<string|int, mixed>
Comments
$condition  : string
Media condition
$elements  : array<string|int, mixed>
Elements
$features  : array<string|int, mixed>
Media features
$ids  : array<string|int, mixed>
IDs
$minify  : bool
Minify flag
$selectors  : array<string|int, mixed>
Selectors
$tabSize  : int
Tab size
$type  : string
Media type
__construct()  : mixed
Constructor
__toString()  : string
To string method
addComment()  : self
Add CSS comment
addSelector()  : self
Add CSS selector
addSelectors()  : self
Add CSS selectors
count()  : int
Method to get the count of properties
getComments()  : array<string|int, mixed>
Get CSS comments
getCondition()  : string
Get condition
getFeature()  : string
Get feature
getFeatures()  : array<string|int, mixed>
Get features
getIterator()  : ArrayIterator
Method to iterate over the properties
getSelector()  : Selector
Get CSS selector
getTabSize()  : int
Get tab size
getType()  : string
Get type
hasFeature()  : bool
Does media query have feature
hasSelector()  : bool
Check if the object has CSS selector
isMinified()  : bool
Check if minify flag is set
minify()  : self
Set minify flag
offsetExists()  : bool
ArrayAccess offsetExists
offsetGet()  : mixed
ArrayAccess offsetGet
offsetSet()  : void
ArrayAccess offsetSet
offsetUnset()  : void
ArrayAccess offsetUnset
removeSelector()  : self
Get CSS selector
render()  : string
Method to render the selector CSS
setCondition()  : self
Set condition
setFeature()  : self
Set feature
setFeatures()  : self
Set features
setTabSize()  : self
Set tab size
setType()  : self
Set type

Properties

$classes

Classes

protected array<string|int, mixed> $classes = []

$comments

Comments

protected array<string|int, mixed> $comments = []

$condition

Media condition

protected string $condition = null

$elements

Elements

protected array<string|int, mixed> $elements = []

$features

Media features

protected array<string|int, mixed> $features = []

$ids

IDs

protected array<string|int, mixed> $ids = []

$selectors

Selectors

protected array<string|int, mixed> $selectors = []

$tabSize

Tab size

protected int $tabSize = 4

$type

Media type

protected string $type = null

Methods

__construct()

Constructor

public __construct([string $type = null ][, array<string|int, mixed> $features = null ][, string $condition = null ][, int $tabSize = 4 ]) : mixed

Instantiate the CSS media object

Parameters
$type : string = null
$features : array<string|int, mixed> = null
$condition : string = null
$tabSize : int = 4
Return values
mixed

__toString()

To string method

public __toString() : string
Return values
string

addComment()

Add CSS comment

public addComment(Comment $comment) : self
Parameters
$comment : Comment
Return values
self

addSelector()

Add CSS selector

public addSelector(Selector $selector) : self
Parameters
$selector : Selector
Return values
self

addSelectors()

Add CSS selectors

public addSelectors(array<string|int, mixed> $selectors) : self
Parameters
$selectors : array<string|int, mixed>
Return values
self

count()

Method to get the count of properties

public count() : int
Return values
int

getComments()

Get CSS comments

public getComments() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCondition()

Get condition

public getCondition() : string
Return values
string

getFeature()

Get feature

public getFeature(string $feature) : string
Parameters
$feature : string
Return values
string

getFeatures()

Get features

public getFeatures() : array<string|int, mixed>
Return values
array<string|int, mixed>

getIterator()

Method to iterate over the properties

public getIterator() : ArrayIterator
Return values
ArrayIterator

getSelector()

Get CSS selector

public getSelector(string $selector) : Selector
Parameters
$selector : string
Return values
Selector

getTabSize()

Get tab size

public getTabSize() : int
Return values
int

getType()

Get type

public getType() : string
Return values
string

hasFeature()

Does media query have feature

public hasFeature(string $feature) : bool
Parameters
$feature : string
Return values
bool

hasSelector()

Check if the object has CSS selector

public hasSelector(string $selector) : bool
Parameters
$selector : string
Return values
bool

isMinified()

Check if minify flag is set

public isMinified() : bool
Return values
bool

minify()

Set minify flag

public minify([bool $minify = true ]) : self
Parameters
$minify : bool = true
Return values
self

offsetExists()

ArrayAccess offsetExists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

ArrayAccess offsetGet

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

ArrayAccess offsetSet

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed
Tags
throws
Exception
Return values
void

offsetUnset()

ArrayAccess offsetUnset

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Return values
void

removeSelector()

Get CSS selector

public removeSelector(string $selector) : self
Parameters
$selector : string
Return values
self

render()

Method to render the selector CSS

public render() : string
Return values
string

setCondition()

Set condition

public setCondition([string $condition = null ]) : self
Parameters
$condition : string = null
Return values
self

setFeature()

Set feature

public setFeature(string $feature, string $value) : self
Parameters
$feature : string
$value : string
Return values
self

setFeatures()

Set features

public setFeatures(array<string|int, mixed> $features) : self
Parameters
$features : array<string|int, mixed>
Return values
self

setTabSize()

Set tab size

public setTabSize(int $tabSize) : self
Parameters
$tabSize : int
Return values
self

setType()

Set type

public setType(string $type) : self
Parameters
$type : string
Return values
self

Search results