PHP Class Gajus\Dindent\Indenter

Mostrar archivo Open project: gajus/dindent Class Usage Examples

Public Methods

Method Description
__construct ( array $options = [] )
getLog ( ) : array Debugging utility. Get log for the last indent operation.
indent ( string $input ) : string
setElementType ( string $element_name, ELEMENT_TYPE_BLOCK | ELEMENT_TYPE_INLINE $type ) : null

Method Details

__construct() public method

public __construct ( array $options = [] )
$options array

getLog() public method

Debugging utility. Get log for the last indent operation.
public getLog ( ) : array
return array

indent() public method

public indent ( string $input ) : string
$input string HTML input.
return string Indented HTML.

setElementType() public method

public setElementType ( string $element_name, ELEMENT_TYPE_BLOCK | ELEMENT_TYPE_INLINE $type ) : null
$element_name string Element name, e.g. "b".
$type ELEMENT_TYPE_BLOCK | ELEMENT_TYPE_INLINE
return null