src/Crossjoin/Css/Format/Rule/AtMedia/MediaRule.php
protected function getQueryInstanceFromQueryString($queryString)
    {
        if (preg_match('/^[ \r\n\t\f]*(?:(only[ \r\n\t\f]+)|(not[ \r\n\t\f]+))?([^ \r\n\t\f]*)[ \r\n\t\f]*(?:(?:and)?[ \r\n\t\f]*)*$/iD', $queryString, $matches)) {
            $type = $matches[3] === "" ? MediaQuery::TYPE_ALL : $matches[3];
            $query = new MediaQuery($type);
            if (!empty($matches[1])) {
                $query->setIsOnly(true);
            }
            if (!empty($matches[2])) {
                $query->setIsNot(true);
            }
            return $query;
        }
        return null;
    }
protected function getQueryInstanceFromQueryString($queryString)
    {
        if (preg_match('/^[ \r\n\t\f]*(?:(only[ \r\n\t\f]+)|(not[ \r\n\t\f]+))?([^ \r\n\t\f]*)[ \r\n\t\f]*(?:(?:and)?[ \r\n\t\f]*)*$/iD', $queryString, $matches)) {
            $type = $matches[3] === "" ? MediaQuery::TYPE_ALL : $matches[3];
            $query = new MediaQuery($type);
            if (!empty($matches[1])) {
                $query->setIsOnly(true);
            }
            if (!empty($matches[2])) {
                $query->setIsNot(true);
            }
            return $query;
        }
        return null;
    }
protected function getQueryInstanceFromQueryString ( $ queryString ) { if ( preg_match ( '/^[ \r\n\t\f]*(?:(only[ \r\n\t\f]+)|(not[ \r\n\t\f]+))?([^ \r\n\t\f]*)[ \r\n\t\f]*(?:(?:and)?[ \r\n\t\f]*)*$/iD' , $ queryString , $ matches ) ) { $ type = $ matches [ 3 ] === "" ? MediaQuery :: TYPE_ALL : $ matches [ 3 ] ; $ query = new MediaQuery ( $ type ) ; if ( ! empty ( $ matches [ 1 ] ) ) { $ query -> setIsOnly ( true ) ; } if ( ! empty ( $ matches [ 2 ] ) ) { $ query -> setIsNot ( true ) ; } return $ query ; } return null ; }
Extracts the type from the query part of the media rule and returns a MediaQuery instance for it.

@param $queryString
@return MediaQuery|null
Extracts the type from the query part of the media rule and returns a MediaQuery instance for it .