PHP Class Interpolation, HamlPHP

Show file Open project: hamlphp/hamlphp Class Usage Examples

Public Methods

Method Description
__construct ( string $text, boolean $inPhpContext = false ) When $inPhpContext is true, instead of putting the expression inde php tags () the class will render a concatenation like: . ($text) . unless the interpolation makes the whole text. In which case, it will only the markers (#{ and }) will be removed.
render ( )

Private Methods

Method Description
_containsInterpolation ( $str )

Method Details

__construct() public method

When $inPhpContext is true, instead of putting the expression inde php tags () the class will render a concatenation like: . ($text) . unless the interpolation makes the whole text. In which case, it will only the markers (#{ and }) will be removed.
public __construct ( string $text, boolean $inPhpContext = false )
$text string
$inPhpContext boolean (default: false) Whether this interpolation is already inside or not

render() public method

public render ( )