\App\Base\Overrides\MigrationsCollection

Overrides migrations collection in order to have them sorted

Summary

Methods
Properties
Constants
__construct()
attach()
detach()
setNamespace()
getNamespace()
migrate()
count()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
execute()
$adapter
$list
$namespace
N/A

Properties

$adapter

$adapter :\Genkgo\Migrations\AdapterInterface

Type

\Genkgo\Migrations\AdapterInterface—adapter

$list

$list :array

Type

array—migrations collection

$namespace

$namespace :string

Type

string—namespace

Methods

__construct()

__construct(\Genkgo\Migrations\AdapterInterface  $adapter)

constructor

Parameters

\Genkgo\Migrations\AdapterInterface $adapter

attach()

attach(\Genkgo\Migrations\MigrationInterface  $migration)

attach migration

Parameters

\Genkgo\Migrations\MigrationInterface $migration

detach()

detach(\Genkgo\Migrations\MigrationInterface  $migration)

detach miggration

Parameters

\Genkgo\Migrations\MigrationInterface $migration

setNamespace()

setNamespace(  $namespace): $this

sets namespace

Parameters

$namespace

Returns

$this

getNamespace()

getNamespace(): string

gets namespace

Returns

string

migrate()

migrate(integer  $direction = \Genkgo\Migrations\MigrationInterface::DIRECTION_UP): \Genkgo\Migrations\Log

do the migration

Parameters

integer $direction

Returns

\Genkgo\Migrations\Log

count()

count(): integer

gets migrations count

Returns

integer

execute()

execute(\Genkgo\Migrations\MigrationInterface  $migration,  $direction)

executes a single migration

Parameters

\Genkgo\Migrations\MigrationInterface $migration
$direction