PHP Класс Laralib\L5scaffold\Migrations\SyntaxBuilder

Автор: Jeffrey Way ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$illuminate boolean

Открытые методы

Метод Описание
create ( array $schema, array $meta, string $type = "migration", boolean $illuminate = false ) : string Create the PHP syntax for the given schema.
setIllumination ( $value ) Enable/Disable use of Illuminate/Html form facades

Приватные методы

Метод Описание
addColumn ( string $field, string $type = "migration", $meta = "" ) : string Construct the syntax to add a column.
buildField ( $field, $type, $variable, boolean $value = true ) : string Build form field with validation using Illuminate/Html Form facade or pure HTML
constructSchema ( array $schema, string $direction = 'Add' ) : array Construct the schema fields.
createSchemaForControllerMethod ( $schema, $meta ) : string Construct the controller fields
createSchemaForDownMethod ( array $schema, array $meta ) : string Construct the syntax for a down field.
createSchemaForUpMethod ( string $schema, array $meta ) : string Create the schema for the "up" method.
createSchemaForViewMethod ( $schema, $meta, string $type = 'index-header' ) : string Construct the view fields
dropColumn ( string $field ) : string Construct the syntax to drop a column.
getChangeSchemaWrapper ( ) : string Get the wrapper template for an "add" action.
getCreateSchemaWrapper ( ) : string Get the wrapper template for a "create" action.
htmlField ( $column, $variable, $field, $type )
insert ( string $template ) Store the given template, to be inserted somewhere.
into ( string $wrapper, string $placeholder = 'schema_up' ) : mixed Get the stored template, and insert into the given wrapper.

Описание методов

create() публичный Метод

Create the PHP syntax for the given schema.
public create ( array $schema, array $meta, string $type = "migration", boolean $illuminate = false ) : string
$schema array
$meta array
$type string
$illuminate boolean
Результат string

setIllumination() публичный Метод

Enable/Disable use of Illuminate/Html form facades
public setIllumination ( $value )
$value

Описание свойств

$illuminate защищенное свойство

protected bool $illuminate
Результат boolean