Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value
Value::parseIdentifierOrFunction
Method of the class: Value{}
No Hooks.
Returns
CSSFunction|String.
Usage
$result = Value::parseIdentifierOrFunction( $oParserState, $bIgnoreCase );
- $oParserState(ParserState) (required)
- .
- $bIgnoreCase(true|false)
- .
Default:false
Value::parseIdentifierOrFunction() Value::parseIdentifierOrFunction code WC 10.5.0
public static function parseIdentifierOrFunction(ParserState $oParserState, $bIgnoreCase = false)
{
$oAnchor = $oParserState->anchor();
$mResult = $oParserState->parseIdentifier($bIgnoreCase);
if ($oParserState->comes('(')) {
$oAnchor->backtrack();
if ($oParserState->streql('url', $mResult)) {
$mResult = URL::parse($oParserState);
} elseif (
$oParserState->streql('calc', $mResult)
|| $oParserState->streql('-webkit-calc', $mResult)
|| $oParserState->streql('-moz-calc', $mResult)
) {
$mResult = CalcFunction::parse($oParserState);
} else {
$mResult = CSSFunction::parse($oParserState, $bIgnoreCase);
}
}
return $mResult;
}