ComponentTagCompiler
Properties
$aliases array
The component class aliases.
$namespaces array
The component class namespaces.
$boundAttributes array
The "bind:" attributes that have been compiled for the current component.
Methods
__construct ( array $aliases , array $namespaces , BladeCompiler $blade ) : void
Create a new component tag compiler.
Parameters
- $aliases array
- $namespaces array
- $blade BladeCompiler |null
compile ( string $value ) : string
Compile the component and slot tags within the given string.
Parameters
- $value string
compileTags ( string $value ) : string
Compile the tags within the given string.
Parameters
- $value string
compileOpeningTags ( string $value ) : string
Compile the opening tags within the given string.
Parameters
- $value string
compileSelfClosingTags ( string $value ) : string
Compile the self-closing tags within the given string.
Parameters
- $value string
componentString ( string $component , array $attributes ) : string
Compile the Blade component string for the given component and attributes.
Parameters
- $component string
- $attributes array
componentClass ( string $component ) : string
Get the component class for a given component alias.
Parameters
- $component string
guessAnonymousComponentUsingPaths ( Factory $viewFactory , string $component ) : string|null
Attempt to find an anonymous component using the registered anonymous component paths.
Parameters
- $viewFactory Factory
- $component string
guessAnonymousComponentUsingNamespaces ( Factory $viewFactory , string $component ) : string|null
Attempt to find an anonymous component using the registered anonymous component namespaces.
Parameters
- $viewFactory Factory
- $component string
findClassByComponent ( string $component ) : string|null
Find the class for the given component using the registered namespaces.
Parameters
- $component string
guessClassName ( string $component ) : string
Guess the class name for the given component.
Parameters
- $component string
formatClassName ( string $component ) : string
Format the class name for the given component.
Parameters
- $component string
guessViewName ( $name , $prefix ) : string
Guess the view name for the given component.
Parameters
- $name string
- $prefix string
partitionDataAndAttributes ( $class , array $attributes ) : array
Partition the data and extra attributes from the given array of attributes.
Parameters
- $class string
- $attributes array
compileClosingTags ( string $value ) : string
Compile the closing tags within the given string.
Parameters
- $value string
compileSlots ( string $value ) : string
Compile the slot tags within the given string.
Parameters
- $value string
getAttributesFromAttributeString ( string $attributeString ) : array
Get an array of attributes from the given attribute string.
Parameters
- $attributeString string
parseShortAttributeSyntax ( string $value ) : string
Parses a short attribute syntax like :$foo into a fully-qualified syntax like :foo="$foo".
Parameters
- $value string
parseAttributeBag ( string $attributeString ) : string
Parse the attribute bag in a given attribute string into its fully-qualified syntax.
Parameters
- $attributeString string
parseComponentTagClassStatements ( string $attributeString ) : string
Parse @class statements in a given attribute string into their fully-qualified syntax.
Parameters
- $attributeString string
parseComponentTagStyleStatements ( string $attributeString ) : string
Parse @style statements in a given attribute string into their fully-qualified syntax.
Parameters
- $attributeString string
parseBindAttributes ( string $attributeString ) : string
Parse the "bind" attributes in a given attribute string into their fully-qualified syntax.
Parameters
- $attributeString string
compileAttributeEchos ( string $attributeString ) : string
Compile any Blade echo statements that are present in the attribute string.
Parameters
- $attributeString string
escapeSingleQuotesOutsideOfPhpBlocks ( string $value ) : string
Escape the single quotes in the given string that are outside of PHP blocks.
Parameters
- $value string
attributesToString ( array $attributes , $escapeBound ) : string
Convert an array of attributes to a string.
Parameters
- $attributes array
- $escapeBound bool
stripQuotes ( string $value ) : string
Strip any quotes from the given string.
Parameters
- $value string