Sabberworm\CSS\CSSList\CSSList::getContents PHP Method

getContents() public method

public getContents ( )
    public function getContents()
    {
        return $this->aContents;
    }

Usage Example

Example #1
0
 private function parseListItem(CSSList $oList, $bIsRoot = false)
 {
     if ($this->comes('@')) {
         $oAtRule = $this->parseAtRule();
         if ($oAtRule instanceof Charset) {
             if (!$bIsRoot) {
                 throw new UnexpectedTokenException('@charset may only occur in root document', '', 'custom', $this->iLineNo);
             }
             if (count($oList->getContents()) > 0) {
                 throw new UnexpectedTokenException('@charset must be the first parseable token in a document', '', 'custom', $this->iLineNo);
             }
             $this->setCharset($oAtRule->getCharset()->getString());
         }
         return $oAtRule;
     } else {
         if ($this->comes('}')) {
             $this->consume('}');
             if ($bIsRoot) {
                 throw new SourceException("Unopened {", $this->iLineNo);
             } else {
                 return null;
             }
         } else {
             return $this->parseSelector();
         }
     }
 }