PHP Class Phpmig\Console\Command\AbstractCommand

Author: Dave Marshall ([email protected])
Inheritance: extends Symfony\Component\Console\Command\Command
Show file Open project: davedevelopment/phpmig Class Usage Examples

Protected Properties

Property Type Description
$adapter Phpmig\Adapter\AdapterInterface
$bootstrap string
$container ArrayAccess
$migrations array

Public Methods

Method Description
getAdapter ( ) : Phpmig\Adapter\AdapterInterface Get Adapter
getBootstrap ( ) : string Get bootstrap
getContainer ( ) : ArrayAccess Get container
getMigrations ( ) : array Get migrations
setAdapter ( Phpmig\Adapter\AdapterInterface $adapter ) : AbstractCommand Set adapter
setBootstrap ( $bootstrap ) : AbstractCommand Set bootstrap
setContainer ( ArrayAccess $container ) : AbstractCommand Set container
setMigrations ( array $migrations ) : AbstractCommand Set migrations

Protected Methods

Method Description
bootstrap ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void Bootstrap phpmig
bootstrapAdapter ( Symfony\Component\Console\Input\InputInterface $input ) : Phpmig\Adapter\AdapterInterface
bootstrapContainer ( ) : ArrayAccess
bootstrapMigrations ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
bootstrapMigrator ( Symfony\Component\Console\Output\OutputInterface $output ) : mixed
configure ( )
findBootstrapFile ( string $filename ) : array | string
migrationToClassName ( $migrationName ) transform create_table_user to CreateTableUser

Method Details

bootstrap() protected method

Bootstrap phpmig
protected bootstrap ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return void

bootstrapAdapter() protected method

protected bootstrapAdapter ( Symfony\Component\Console\Input\InputInterface $input ) : Phpmig\Adapter\AdapterInterface
$input Symfony\Component\Console\Input\InputInterface
return Phpmig\Adapter\AdapterInterface

bootstrapContainer() protected method

protected bootstrapContainer ( ) : ArrayAccess
return ArrayAccess The container

bootstrapMigrations() protected method

protected bootstrapMigrations ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

bootstrapMigrator() protected method

protected bootstrapMigrator ( Symfony\Component\Console\Output\OutputInterface $output ) : mixed
$output Symfony\Component\Console\Output\OutputInterface
return mixed

configure() protected method

protected configure ( )

findBootstrapFile() protected method

protected findBootstrapFile ( string $filename ) : array | string
$filename string
return array | string

getAdapter() public method

Get Adapter
public getAdapter ( ) : Phpmig\Adapter\AdapterInterface
return Phpmig\Adapter\AdapterInterface

getBootstrap() public method

Get bootstrap
public getBootstrap ( ) : string
return string

getContainer() public method

Get container
public getContainer ( ) : ArrayAccess
return ArrayAccess

getMigrations() public method

Get migrations
public getMigrations ( ) : array
return array

migrationToClassName() protected method

transform create_table_user to CreateTableUser
protected migrationToClassName ( $migrationName )

setAdapter() public method

Set adapter
public setAdapter ( Phpmig\Adapter\AdapterInterface $adapter ) : AbstractCommand
$adapter Phpmig\Adapter\AdapterInterface
return AbstractCommand

setBootstrap() public method

Set bootstrap
public setBootstrap ( $bootstrap ) : AbstractCommand
return AbstractCommand

setContainer() public method

Set container
public setContainer ( ArrayAccess $container ) : AbstractCommand
$container ArrayAccess
return AbstractCommand

setMigrations() public method

Set migrations
public setMigrations ( array $migrations ) : AbstractCommand
$migrations array
return AbstractCommand

Property Details

$adapter protected property

protected AdapterInterface,Phpmig\Adapter $adapter
return Phpmig\Adapter\AdapterInterface

$bootstrap protected property

protected string $bootstrap
return string

$container protected property

protected ArrayAccess $container
return ArrayAccess

$migrations protected property

protected array $migrations
return array