\Charcoal\Admin\Script\Object\TableAlterScript

Alter an object's table (sql source) according to its metadata's properties.

Summary

Methods
Properties
Constants
setDependencies()
defaultArguments()
run()
No public properties found
No constants found
setModelFactory()
modelFactory()
propertyToInput()
No protected properties found
N/A
booleanInput()
passwordInput()
$modelFactory
N/A

Properties

$modelFactory

$modelFactory : \Charcoal\Factory\FactoryInterface

Type

\Charcoal\Factory\FactoryInterface

Methods

setDependencies()

setDependencies(\Pimple\Container  $container) : void

Parameters

\Pimple\Container $container

Pimple DI container.

defaultArguments()

defaultArguments() : array

Returns

array

run()

run(\Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response) : \Psr\Http\Message\ResponseInterface

Parameters

\Psr\Http\Message\RequestInterface $request

A PSR-7 compatible Request instance.

\Psr\Http\Message\ResponseInterface $response

A PSR-7 compatible Response instance.

Returns

\Psr\Http\Message\ResponseInterface

setModelFactory()

setModelFactory(\Charcoal\Factory\FactoryInterface  $factory) : \Charcoal\Admin\AdminScript

Parameters

\Charcoal\Factory\FactoryInterface $factory

The factory used to create models.

Returns

\Charcoal\Admin\AdminScript

Chainable

modelFactory()

modelFactory() : \Charcoal\Factory\FactoryInterface

Returns

\Charcoal\Factory\FactoryInterface —

The model factory.

propertyToInput()

propertyToInput(\Charcoal\Property\PropertyInterface  $prop) : mixed

Parameters

\Charcoal\Property\PropertyInterface $prop

The property to retrieve input from.

Returns

mixed

booleanInput()

booleanInput(\Charcoal\Property\PropertyInterface  $prop) : \League\CLImate\TerminalObject\Dynamic\Input

Get a CLI input from a boolean property.

Parameters

\Charcoal\Property\PropertyInterface $prop

The property to retrieve input from.

Returns

\League\CLImate\TerminalObject\Dynamic\Input

passwordInput()

passwordInput(\Charcoal\Property\PropertyInterface  $prop) : \League\CLImate\TerminalObject\Dynamic\Input

Get a CLI password input (hidden) from a password property.

Parameters

\Charcoal\Property\PropertyInterface $prop

The property to retrieve input from.

Returns

\League\CLImate\TerminalObject\Dynamic\Input