\Box\Brainy\Compiler\WrappersStaticWrapper

Summary

Methods
Properties
Constants
__construct()
__toString()
concat()
static_concat()
static_if_all()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$code
N/A

Properties

$code

$code : 

Type

Methods

__construct()

__construct(string  $code) 

Parameters

string $code

__toString()

__toString() : string

The __toString() method un-statics the contents

Returns

string

concat()

concat(string|\Box\Brainy\Compiler\Wrappers\StaticWrapper  $left, string|\Box\Brainy\Compiler\Wrappers\StaticWrapper  $right) : string|\Box\Brainy\Compiler\Wrappers\StaticWrapper

Combine two values which may be static wrappers. The output is only a static wrapper if both the left and the right are static wrappers.

Parameters

string|\Box\Brainy\Compiler\Wrappers\StaticWrapper $left
string|\Box\Brainy\Compiler\Wrappers\StaticWrapper $right

Returns

string|\Box\Brainy\Compiler\Wrappers\StaticWrapper

static_concat()

static_concat(string|\Box\Brainy\Compiler\Wrappers\StaticWrapper  $left, string|\Box\Brainy\Compiler\Wrappers\StaticWrapper  $right) : string|\Box\Brainy\Compiler\Wrappers\StaticWrapper

Combine two values which may be static wrappers. The output is a static wrapper if either the left or the right are static wrappers. This is only to be used in cases where the left or the right is known not to affect whether the result is a static wrapper.

Parameters

string|\Box\Brainy\Compiler\Wrappers\StaticWrapper $left
string|\Box\Brainy\Compiler\Wrappers\StaticWrapper $right

Returns

string|\Box\Brainy\Compiler\Wrappers\StaticWrapper

static_if_all()

static_if_all(string  $code, array  $conditions) : string|\Box\Brainy\Compiler\Wrappers\StaticWrapper

If all of the values in $conditions are static wrappers, the result is a static wrapper of $code. Otherwise, $code is returned.

Parameters

string $code
array $conditions

Returns

string|\Box\Brainy\Compiler\Wrappers\StaticWrapper