platform/api/laravel/Database/Migrations/MigrationCreator.yaml
2024-09-02 10:44:11 -07:00

203 lines
4 KiB
YAML

name: MigrationCreator
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: Filesystem
type: class
source: Illuminate\Filesystem\Filesystem
- name: Str
type: class
source: Illuminate\Support\Str
- name: InvalidArgumentException
type: class
source: InvalidArgumentException
properties:
- name: files
visibility: protected
comment: '# * The filesystem instance.
# *
# * @var \Illuminate\Filesystem\Filesystem'
- name: customStubPath
visibility: protected
comment: '# * The custom app stubs directory.
# *
# * @var string'
- name: postCreate
visibility: protected
comment: '# * The registered post create hooks.
# *
# * @var array'
methods:
- name: __construct
visibility: public
parameters:
- name: files
- name: customStubPath
comment: "# * The filesystem instance.\n# *\n# * @var \\Illuminate\\Filesystem\\\
Filesystem\n# */\n# protected $files;\n# \n# /**\n# * The custom app stubs directory.\n\
# *\n# * @var string\n# */\n# protected $customStubPath;\n# \n# /**\n# * The registered\
\ post create hooks.\n# *\n# * @var array\n# */\n# protected $postCreate = [];\n\
# \n# /**\n# * Create a new migration creator instance.\n# *\n# * @param \\Illuminate\\\
Filesystem\\Filesystem $files\n# * @param string $customStubPath\n# * @return\
\ void"
- name: create
visibility: public
parameters:
- name: name
- name: path
- name: table
default: 'null'
- name: create
default: 'false'
comment: '# * Create a new migration at the given path.
# *
# * @param string $name
# * @param string $path
# * @param string|null $table
# * @param bool $create
# * @return string
# *
# * @throws \Exception'
- name: ensureMigrationDoesntAlreadyExist
visibility: protected
parameters:
- name: name
- name: migrationPath
default: 'null'
comment: '# * Ensure that a migration with the given name doesn''t already exist.
# *
# * @param string $name
# * @param string $migrationPath
# * @return void
# *
# * @throws \InvalidArgumentException'
- name: getStub
visibility: protected
parameters:
- name: table
- name: create
comment: '# * Get the migration stub file.
# *
# * @param string|null $table
# * @param bool $create
# * @return string'
- name: populateStub
visibility: protected
parameters:
- name: stub
- name: table
comment: '# * Populate the place-holders in the migration stub.
# *
# * @param string $stub
# * @param string|null $table
# * @return string'
- name: getClassName
visibility: protected
parameters:
- name: name
comment: '# * Get the class name of a migration name.
# *
# * @param string $name
# * @return string'
- name: getPath
visibility: protected
parameters:
- name: name
- name: path
comment: '# * Get the full path to the migration.
# *
# * @param string $name
# * @param string $path
# * @return string'
- name: firePostCreateHooks
visibility: protected
parameters:
- name: table
- name: path
comment: '# * Fire the registered post create hooks.
# *
# * @param string|null $table
# * @param string $path
# * @return void'
- name: afterCreate
visibility: public
parameters:
- name: callback
comment: '# * Register a post migration create hook.
# *
# * @param \Closure $callback
# * @return void'
- name: getDatePrefix
visibility: protected
parameters: []
comment: '# * Get the date prefix for the migration.
# *
# * @return string'
- name: stubPath
visibility: public
parameters: []
comment: '# * Get the path to the stubs.
# *
# * @return string'
- name: getFilesystem
visibility: public
parameters: []
comment: '# * Get the filesystem instance.
# *
# * @return \Illuminate\Filesystem\Filesystem'
traits:
- Closure
- Illuminate\Filesystem\Filesystem
- Illuminate\Support\Str
- InvalidArgumentException
interfaces: []