Documentation

Collection
in package

Overrides migrations collection in order to have them sorted

Table of Contents

Properties

$adapter  : AdapterInterface
$list  : array<string|int, mixed>
$namespace  : string

Methods

__construct()  : mixed
constructor
attach()  : void
attach migration
count()  : int
gets migrations count
detach()  : void
detach migration
getNamespace()  : string
gets namespace
migrate()  : Log
do the migration
setNamespace()  : $this
sets namespace
execute()  : void
executes a single migration

Properties

$adapter

private AdapterInterface $adapter

adapter

$list

private array<string|int, mixed> $list = []

migrations collection

Methods

__construct()

constructor

public __construct(AdapterInterface $adapter) : mixed
Parameters
$adapter : AdapterInterface

attach()

attach migration

public attach(MigrationInterface $migration) : void
Parameters
$migration : MigrationInterface

count()

gets migrations count

public count() : int
Return values
int

detach()

detach migration

public detach(MigrationInterface $migration) : void
Parameters
$migration : MigrationInterface

getNamespace()

gets namespace

public getNamespace() : string
Return values
string

migrate()

do the migration

public migrate([int $direction = MigrationInterface::DIRECTION_UP ]) : Log
Parameters
$direction : int = MigrationInterface::DIRECTION_UP
Return values
Log

setNamespace()

sets namespace

public setNamespace(mixed $namespace) : $this
Parameters
$namespace : mixed
Return values
$this

execute()

executes a single migration

private execute(MigrationInterface $migration, mixed $direction) : void
Parameters
$migration : MigrationInterface
$direction : mixed

        
On this page

Search results