PHP Class Spatie\BladeJavaScript\Renderer

Show file Open project: spatie/laravel-blade-javascript

Protected Properties

Property Type Description
$namespace
$transformers

Public Methods

Method Description
__construct ( Illuminate\Config\Repository $config )
buildJavaScriptSyntax ( array $variables ) : string
getAllTransformers ( ) : Collection
getTransformer ( mixed $value ) : Spatie\BladeJavaScript\Transformers\Transformer
render ( $arguments ) : string

Protected Methods

Method Description
buildNamespaceDeclaration ( ) : string
buildVariableInitialization ( string $key, mixed $value ) : string
normalizeArguments ( array $arguments ) : mixed
optimizeValueForJavaScript ( mixed $value ) : string

Method Details

__construct() public method

public __construct ( Illuminate\Config\Repository $config )
$config Illuminate\Config\Repository

buildJavaScriptSyntax() public method

public buildJavaScriptSyntax ( array $variables ) : string
$variables array
return string

buildNamespaceDeclaration() protected method

protected buildNamespaceDeclaration ( ) : string
return string

buildVariableInitialization() protected method

protected buildVariableInitialization ( string $key, mixed $value ) : string
$key string
$value mixed
return string

getAllTransformers() public method

public getAllTransformers ( ) : Collection
return Illuminate\Support\Collection

getTransformer() public method

public getTransformer ( mixed $value ) : Spatie\BladeJavaScript\Transformers\Transformer
$value mixed
return Spatie\BladeJavaScript\Transformers\Transformer

normalizeArguments() protected method

protected normalizeArguments ( array $arguments ) : mixed
$arguments array
return mixed

optimizeValueForJavaScript() protected method

protected optimizeValueForJavaScript ( mixed $value ) : string
$value mixed
return string

render() public method

public render ( $arguments ) : string
$arguments
return string

Property Details

$namespace protected property

protected $namespace

$transformers protected property

protected $transformers