class Illuminate / View / Compilers / ComponentTagCompiler
You are viewing an older version of the documentation. For the latest, please visit master documentation.

ComponentTagCompiler

Properties

protected

$blade BladeCompiler

The Blade compiler instance.

Default: null
protected

$aliases array

The component class aliases.

Default: []
protected

$namespaces array

The component class namespaces.

Default: []
protected

$boundAttributes array

The "bind:" attributes that have been compiled for the current component.

Default: []

Methods

public

__construct ( array $aliases , array $namespaces , BladeCompiler $blade ) : void

Create a new component tag compiler.

Parameters

public

compile ( string $value ) : string

Compile the component and slot tags within the given string.

Parameters

  • $value string
public

compileTags ( string $value ) : string

Compile the tags within the given string.

Parameters

  • $value string
protected

compileOpeningTags ( string $value ) : string

Compile the opening tags within the given string.

Parameters

  • $value string
protected

compileSelfClosingTags ( string $value ) : string

Compile the self-closing tags within the given string.

Parameters

  • $value string
protected

componentString ( string $component , array $attributes ) : string

Compile the Blade component string for the given component and attributes.

Parameters

  • $component string
  • $attributes array
public

componentClass ( string $component ) : string

Get the component class for a given component alias.

Parameters

  • $component string
public

findClassByComponent ( string $component ) : string|null

Find the class for the given component using the registered namespaces.

Parameters

  • $component string
public

guessClassName ( string $component ) : string

Guess the class name for the given component.

Parameters

  • $component string
public

formatClassName ( string $component ) : string

Format the class name for the given component.

Parameters

  • $component string
public

guessViewName ( $name ) : string

Guess the view name for the given component.

Parameters

  • $name string
public

partitionDataAndAttributes ( $class , array $attributes ) : array

Partition the data and extra attributes from the given array of attributes.

Parameters

  • $class string
  • $attributes array
protected

compileClosingTags ( string $value ) : string

Compile the closing tags within the given string.

Parameters

  • $value string
public

compileSlots ( string $value ) : string

Compile the slot tags within the given string.

Parameters

  • $value string
protected

getAttributesFromAttributeString ( string $attributeString ) : array

Get an array of attributes from the given attribute string.

Parameters

  • $attributeString string
protected

parseAttributeBag ( string $attributeString ) : string

Parse the attribute bag in a given attribute string into its fully-qualified syntax.

Parameters

  • $attributeString string
protected

parseBindAttributes ( string $attributeString ) : string

Parse the "bind" attributes in a given attribute string into their fully-qualified syntax.

Parameters

  • $attributeString string
protected

compileAttributeEchos ( string $attributeString ) : string

Compile any Blade echo statements that are present in the attribute string.

Parameters

  • $attributeString string
protected

escapeSingleQuotesOutsideOfPhpBlocks ( string $value ) : string

Escape the single quotes in the given string that are outside of PHP blocks.

Parameters

  • $value string
protected

attributesToString ( array $attributes , $escapeBound ) : string

Convert an array of attributes to a string.

Parameters

  • $attributes array
  • $escapeBound bool
public

stripQuotes ( string $value ) : string

Strip any quotes from the given string.

Parameters

  • $value string