mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-05 09:04:19 +01:00
Re-dump autoloader and composer.lock
This commit is contained in:
@@ -8,6 +8,9 @@ use Sabberworm\CSS\Parsing\SourceException;
|
||||
use Sabberworm\CSS\Parsing\UnexpectedEOFException;
|
||||
use Sabberworm\CSS\Parsing\UnexpectedTokenException;
|
||||
|
||||
/**
|
||||
* This class represents URLs in CSS. `URL`s always output in `URL("")` notation.
|
||||
*/
|
||||
class URL extends PrimitiveValue
|
||||
{
|
||||
/**
|
||||
@@ -30,14 +33,26 @@ class URL extends PrimitiveValue
|
||||
* @throws SourceException
|
||||
* @throws UnexpectedEOFException
|
||||
* @throws UnexpectedTokenException
|
||||
*
|
||||
* @internal since V8.8.0
|
||||
*/
|
||||
public static function parse(ParserState $oParserState)
|
||||
{
|
||||
$bUseUrl = $oParserState->comes('url', true);
|
||||
$oAnchor = $oParserState->anchor();
|
||||
$sIdentifier = '';
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$sChar = $oParserState->parseCharacter(true);
|
||||
if ($sChar === null) {
|
||||
break;
|
||||
}
|
||||
$sIdentifier .= $sChar;
|
||||
}
|
||||
$bUseUrl = $oParserState->streql($sIdentifier, 'url');
|
||||
if ($bUseUrl) {
|
||||
$oParserState->consume('url');
|
||||
$oParserState->consumeWhiteSpace();
|
||||
$oParserState->consume('(');
|
||||
} else {
|
||||
$oAnchor->backtrack();
|
||||
}
|
||||
$oParserState->consumeWhiteSpace();
|
||||
$oResult = new URL(CSSString::parse($oParserState), $oParserState->currentLine());
|
||||
@@ -66,6 +81,8 @@ class URL extends PrimitiveValue
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @deprecated in V8.8.0, will be removed in V9.0.0. Use `render` instead.
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
@@ -73,9 +90,11 @@ class URL extends PrimitiveValue
|
||||
}
|
||||
|
||||
/**
|
||||
* @param OutputFormat|null $oOutputFormat
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render(OutputFormat $oOutputFormat)
|
||||
public function render($oOutputFormat)
|
||||
{
|
||||
return "url({$this->oURL->render($oOutputFormat)})";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user