Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
ScssPhp\ScssPhp\Formatter\Compact Class Reference

Compact formatter. More...

Inheritance diagram for ScssPhp\ScssPhp\Formatter\Compact:
ScssPhp\ScssPhp\Formatter

Public Member Functions

 __construct ()
 {Initialize formatter.@api}
 
 customProperty ($name, $value)
 Return custom property assignment differs in that you have to keep spaces in the value as is.
 
 format (OutputBlock $block, SourceMapGenerator $sourceMapGenerator=null)
 Entry point to formatting a block.
 
 indentStr ()
 {Return indentation (whitespace)
Return values
string
}
 
 property ($name, $value)
 Return property assignment.
 

Public Attributes

string $assignSeparator
 
string $break
 
string $close
 
string $indentChar
 
int $indentLevel
 
bool $keepSemicolons
 
string $open
 
string $tagSeparator
 

Protected Member Functions

 block (OutputBlock $block)
 Output non-empty block.
 
 blockChildren (OutputBlock $block)
 Output block children.
 
 blockLines (OutputBlock $block)
 Output lines inside a block.
 
 blockSelectors (OutputBlock $block)
 Output block selectors.
 
 testEmptyChildren ($block)
 Test and clean safely empty children.
 
 write ($str)
 Output content.
 

Protected Attributes

ScssPhp ScssPhp Formatter OutputBlock $currentBlock
 
int $currentColumn
 
int $currentLine
 
ScssPhp ScssPhp SourceMap SourceMapGenerator null $sourceMapGenerator
 
string $strippedSemicolon
 

Detailed Description

Compact formatter.

Author
Leaf Corcoran leafo.nosp@m.t@gm.nosp@m.ail.c.nosp@m.om
Deprecated
since 1.4.0. Use the Compressed formatter instead.

Constructor & Destructor Documentation

◆ __construct()

ScssPhp\ScssPhp\Formatter\Compact::__construct ( )

{Initialize formatter.@api}

Reimplemented from ScssPhp\ScssPhp\Formatter.

Member Function Documentation

◆ block()

ScssPhp\ScssPhp\Formatter::block ( OutputBlock $block)
protectedinherited

Output non-empty block.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$block
Return values
void

Reimplemented in ScssPhp\ScssPhp\Formatter\Debug, and ScssPhp\ScssPhp\Formatter\Nested.

◆ blockChildren()

ScssPhp\ScssPhp\Formatter::blockChildren ( OutputBlock $block)
protectedinherited

Output block children.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$block
Return values
void

Reimplemented in ScssPhp\ScssPhp\Formatter\Debug.

◆ blockLines()

ScssPhp\ScssPhp\Formatter::blockLines ( OutputBlock $block)
protectedinherited

◆ blockSelectors()

ScssPhp\ScssPhp\Formatter::blockSelectors ( OutputBlock $block)
protectedinherited

◆ customProperty()

ScssPhp\ScssPhp\Formatter::customProperty ( $name,
$value )
inherited

Return custom property assignment differs in that you have to keep spaces in the value as is.

@api

Parameters
string$name
mixed$value
Return values
string

◆ format()

ScssPhp\ScssPhp\Formatter::format ( OutputBlock $block,
SourceMapGenerator $sourceMapGenerator = null )
inherited

Entry point to formatting a block.

@api

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$blockAn abstract syntax tree
ScssPhp\ScssPhp\SourceMap\SourceMapGenerator | null$sourceMapGeneratorOptional source map generator
Return values
string

◆ indentStr()

ScssPhp\ScssPhp\Formatter\Compact::indentStr ( )

{Return indentation (whitespace)

Return values
string
}

Reimplemented from ScssPhp\ScssPhp\Formatter.

◆ property()

ScssPhp\ScssPhp\Formatter::property ( $name,
$value )
inherited

Return property assignment.

@api

Parameters
string$name
mixed$value
Return values
string

◆ testEmptyChildren()

ScssPhp\ScssPhp\Formatter::testEmptyChildren ( $block)
protectedinherited

Test and clean safely empty children.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$block
Return values
bool

◆ write()

ScssPhp\ScssPhp\Formatter::write ( $str)
protectedinherited

Output content.

Parameters
string$str
Return values
void

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