Automattic\WooCommerce\EmailEditorVendor\Sabberworm\CSS\Value
Value::parseIdentifierOrFunction
Метод класса: Value{}
Хуков нет.
Возвращает
CSSFunction|string.
Использование
$result = Value::parseIdentifierOrFunction( $oParserState, $bIgnoreCase );
- $oParserState(ParserState) (обязательный)
- .
- $bIgnoreCase(true|false)
- .
По умолчанию:false
Код Value::parseIdentifierOrFunction() Value::parseIdentifierOrFunction WC 11.3.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;
}