PHP Class Nwidart\Modules\Support\Migrations\NameParser

ファイルを表示 Open project: nwidart/laravel-modules Class Usage Examples

Protected Properties

Property Type Description
$actions array The available schema actions.
$data array The array data.
$name string The migration name.

Public Methods

Method Description
__construct ( string $name ) The constructor.
getAction ( ) : string Get schema type or action.
getData ( ) : array Get the array data.
getMatches ( ) : array Get matches data from regex.
getOriginalName ( ) : string Get original migration name.
getPattern ( ) : string Get name pattern.
getTableName ( ) : string Get the table will be used.
is ( $type ) : boolean Determine whether the given type is same with the current schema action or type.
isAdd ( ) : boolean Determine whether the current schema action is a adding action.
isCreate ( ) : boolean Determine whether the current schema action is a creating action.
isDelete ( ) : boolean Determine whether the current schema action is a deleting action.
isDrop ( ) : boolean Determine whether the current schema action is a dropping action.

Protected Methods

Method Description
fetchData ( ) : array Fetch the migration name to an array data.

Method Details

__construct() public method

The constructor.
public __construct ( string $name )
$name string

fetchData() protected method

Fetch the migration name to an array data.
protected fetchData ( ) : array
return array

getAction() public method

Get schema type or action.
public getAction ( ) : string
return string

getData() public method

Get the array data.
public getData ( ) : array
return array

getMatches() public method

Get matches data from regex.
public getMatches ( ) : array
return array

getOriginalName() public method

Get original migration name.
public getOriginalName ( ) : string
return string

getPattern() public method

Get name pattern.
public getPattern ( ) : string
return string

getTableName() public method

Get the table will be used.
public getTableName ( ) : string
return string

is() public method

Determine whether the given type is same with the current schema action or type.
public is ( $type ) : boolean
$type
return boolean

isAdd() public method

Determine whether the current schema action is a adding action.
public isAdd ( ) : boolean
return boolean

isCreate() public method

Determine whether the current schema action is a creating action.
public isCreate ( ) : boolean
return boolean

isDelete() public method

Determine whether the current schema action is a deleting action.
public isDelete ( ) : boolean
return boolean

isDrop() public method

Determine whether the current schema action is a dropping action.
public isDrop ( ) : boolean
return boolean

Property Details

$actions protected_oe property

The available schema actions.
protected array $actions
return array

$data protected_oe property

The array data.
protected array $data
return array

$name protected_oe property

The migration name.
protected string $name
return string