Documentation

Css extends AbstractCss
in package

Pop CSS 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
$elements  : array<string|int, mixed>
Elements
$ids  : array<string|int, mixed>
IDs
$media  : array<string|int, mixed>
Media queries
$minify  : bool
Minify flag
$selectors  : array<string|int, mixed>
Selectors
__toString()  : string
To string method
addComment()  : self
Add CSS comment
addMedia()  : self
Add media query
addSelector()  : self
Add CSS selector
addSelectors()  : self
Add CSS selectors
count()  : int
Method to get the count of properties
getAllMedia()  : array<string|int, mixed>
Get all media queries
getComments()  : array<string|int, mixed>
Get CSS comments
getIterator()  : ArrayIterator
Method to iterate over the properties
getMedia()  : Media
Get media query by index
getSelector()  : Selector
Get CSS selector
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
parseCss()  : self
Parse CSS string
parseCssFile()  : self
Parse CSS string from file
parseCssUri()  : self
Parse CSS string from URI
parseFile()  : self
Parse CSS from file
parseString()  : self
Parse CSS string
parseUri()  : self
Parse CSS from URI
removeAllMedia()  : self
Remove all media queries
removeMedia()  : self
Remove media query by index
removeSelector()  : self
Get CSS selector
render()  : string
Method to render the selector CSS
parseSelectors()  : array<string|int, mixed>
Method to parse the CSS selectors from a string

Properties

$classes

Classes

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

$comments

Comments

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

$elements

Elements

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

$ids

IDs

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

$media

Media queries

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

$selectors

Selectors

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

Methods

__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

addMedia()

Add media query

public addMedia(Media $media) : self
Parameters
$media : Media
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

getAllMedia()

Get all media queries

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

getComments()

Get CSS comments

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

getIterator()

Method to iterate over the properties

public getIterator() : ArrayIterator
Return values
ArrayIterator

getMedia()

Get media query by index

public getMedia(int $i) : Media
Parameters
$i : int
Return values
Media

getSelector()

Get CSS selector

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

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

parseCss()

Parse CSS string

public parseCss(string $cssString) : self
Parameters
$cssString : string
Return values
self

parseCssFile()

Parse CSS string from file

public parseCssFile(string $cssFile) : self
Parameters
$cssFile : string
Tags
throws
Exception
Return values
self

parseCssUri()

Parse CSS string from URI

public parseCssUri(string $cssUri) : self
Parameters
$cssUri : string
Return values
self

parseFile()

Parse CSS from file

public static parseFile(string $cssFile) : self
Parameters
$cssFile : string
Return values
self

parseString()

Parse CSS string

public static parseString(string $cssString) : self
Parameters
$cssString : string
Return values
self

parseUri()

Parse CSS from URI

public static parseUri(string $cssUri) : self
Parameters
$cssUri : string
Return values
self

removeAllMedia()

Remove all media queries

public removeAllMedia() : self
Return values
self

removeMedia()

Remove media query by index

public removeMedia(int $i) : self
Parameters
$i : int
Return values
self

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

parseSelectors()

Method to parse the CSS selectors from a string

protected parseSelectors(string $cssString) : array<string|int, mixed>
Parameters
$cssString : string
Return values
array<string|int, mixed>

Search results