Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
CssCommentParserPlugin Class Reference
Inheritance diagram for CssCommentParserPlugin:
aCssParserPlugin

Public Member Functions

 getTriggerChars ()
 getTriggerStates ()
 parse ($index, $char, $previousChar, $state)
- Public Member Functions inherited from aCssParserPlugin
 __construct (CssParser $parser, array $configuration=null)

Additional Inherited Members

- Protected Attributes inherited from aCssParserPlugin
 $configuration = array()
 $parser = null
 $buffer = ""

Detailed Description

Definition at line 3845 of file cssmin.php.

Member Function Documentation

CssCommentParserPlugin::getTriggerChars ( )

Implements aCssParserPlugin::getTriggerChars().

Returns
array

Reimplemented from aCssParserPlugin.

Definition at line 3852 of file cssmin.php.

{
return array("*", "/");
}
CssCommentParserPlugin::getTriggerStates ( )

Implements aCssParserPlugin::getTriggerStates().

Returns
array

Reimplemented from aCssParserPlugin.

Definition at line 3861 of file cssmin.php.

{
return false;
}
CssCommentParserPlugin::parse (   $index,
  $char,
  $previousChar,
  $state 
)

Implements aCssParserPlugin::parse().

Parameters
integer$indexCurrent index
string$charCurrent char
string$previousCharPrevious char
Returns
mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing

Reimplemented from aCssParserPlugin.

Definition at line 3879 of file cssmin.php.

{
if ($char === "*" && $previousChar === "/" && $state !== "T_COMMENT")
{
$this->parser->pushState("T_COMMENT");
$this->parser->setExclusive(__CLASS__);
$this->restoreBuffer = substr($this->parser->getAndClearBuffer(), 0, -2);
}
elseif ($char === "/" && $previousChar === "*" && $state === "T_COMMENT")
{
$this->parser->popState();
$this->parser->unsetExclusive();
$this->parser->appendToken(new CssCommentToken("/*" . $this->parser->getAndClearBuffer()));
$this->parser->setBuffer($this->restoreBuffer);
}
else
{
return false;
}
return true;
}

The documentation for this class was generated from the following file: