PHP Class Flarum\Database\MigrationCreator

Mostra file Open project: flarum/core Class Usage Examples

Protected Properties

Property Type Description
$files Illuminate\Filesystem\Filesystem The filesystem instance.
$publicPath string

Public Methods

Method Description
__construct ( Illuminate\Filesystem\Filesystem $files, string $publicPath ) Create a new migrator instance.
create ( string $name, Extension $extension = null, string $table = null, boolean $create = false ) : string Create a new migration for the given extension.

Protected Methods

Method Description
getDatePrefix ( ) : string Get the date prefix for the migration.
getMigrationPath ( string $extension ) : string Get the full path name to the migration directory.
getPath ( string $name, string $path ) : string Get the full path name to the migration.
getStub ( string $table, boolean $create ) : string Get the migration stub file.
getStubPath ( ) : string Get the path to the stubs.
populateStub ( string $stub, string $table ) : string Populate the place-holders in the migration stub.

Method Details

__construct() public method

Create a new migrator instance.
public __construct ( Illuminate\Filesystem\Filesystem $files, string $publicPath )
$files Illuminate\Filesystem\Filesystem
$publicPath string

create() public method

Create a new migration for the given extension.
public create ( string $name, Extension $extension = null, string $table = null, boolean $create = false ) : string
$name string
$extension Flarum\Extension\Extension
$table string
$create boolean
return string

getDatePrefix() protected method

Get the date prefix for the migration.
protected getDatePrefix ( ) : string
return string

getMigrationPath() protected method

Get the full path name to the migration directory.
protected getMigrationPath ( string $extension ) : string
$extension string
return string

getPath() protected method

Get the full path name to the migration.
protected getPath ( string $name, string $path ) : string
$name string
$path string
return string

getStub() protected method

Get the migration stub file.
protected getStub ( string $table, boolean $create ) : string
$table string
$create boolean
return string

getStubPath() protected method

Get the path to the stubs.
protected getStubPath ( ) : string
return string

populateStub() protected method

Populate the place-holders in the migration stub.
protected populateStub ( string $stub, string $table ) : string
$stub string
$table string
return string

Property Details

$files protected_oe property

The filesystem instance.
protected Filesystem,Illuminate\Filesystem $files
return Illuminate\Filesystem\Filesystem

$publicPath protected_oe property

protected string $publicPath
return string