PHP 클래스 Neos\Flow\Command\DoctrineCommandController

상속: extends Neos\Flow\Cli\CommandController
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$doctrineService Neos\Flow\Persistence\Doctrine\Service
$packageManager Neos\Flow\Package\PackageManagerInterface
$settings array
$systemLogger Neos\Flow\Log\SystemLoggerInterface

공개 메소드들

메소드 설명
compileProxiesCommand ( ) : void Compile the Doctrine proxy classes
createCommand ( string $output = null ) : void Create the database schema
dqlCommand ( integer $depth = 3, string $hydrationMode = 'array', integer $offset = null, integer $limit = null ) : void Run arbitrary DQL and display results
entityStatusCommand ( boolean $dumpMappingData = false, string $entityClassName = null ) : void Show the current status of entities and mappings
injectSettings ( array $settings ) : void Injects the Flow settings, only the persistence part is kept for further use
migrateCommand ( string $version = null, string $output = null, boolean $dryRun = false, boolean $quiet = false ) : void Migrate the database schema
migrationExecuteCommand ( string $version, string $direction = 'up', string $output = null, boolean $dryRun = false ) : void Execute a single migration
migrationGenerateCommand ( boolean $diffAgainstCurrent = true, string $filterExpression = null ) : void Generate a new migration
migrationStatusCommand ( boolean $showMigrations = false, boolean $showDescriptions = false ) : void Show the current migration status
migrationVersionCommand ( string $version, boolean $add = false, boolean $delete = false ) : void Mark/unmark migrations as migrated
updateCommand ( boolean $unsafeMode = false, string $output = null ) : void Update the database schema
validateCommand ( ) : void Validate the class/table mappings

보호된 메소드들

메소드 설명
emitAfterDatabaseMigration ( ) : void
handleException ( Exception $exception ) : void Output an error message and log the exception.
isDatabaseConfigured ( )

메소드 상세

compileProxiesCommand() 공개 메소드

Compile the Doctrine proxy classes
public compileProxiesCommand ( ) : void
리턴 void

createCommand() 공개 메소드

Creates a new database schema based on the current mapping information. It expects the database to be empty, if tables that are to be created already exist, this will lead to errors.
public createCommand ( string $output = null ) : void
$output string A file to write SQL to, instead of executing it
리턴 void

dqlCommand() 공개 메소드

Any DQL queries passed after the parameters will be executed, the results will be output: doctrine:dql --limit 10 'SELECT a FROM Neos\Flow\Security\Account a'
public dqlCommand ( integer $depth = 3, string $hydrationMode = 'array', integer $offset = null, integer $limit = null ) : void
$depth integer How many levels deep the result should be dumped
$hydrationMode string One of: object, array, scalar, single-scalar, simpleobject
$offset integer Offset the result by this number
$limit integer Limit the result to this number
리턴 void

emitAfterDatabaseMigration() 보호된 메소드

protected emitAfterDatabaseMigration ( ) : void
리턴 void

entityStatusCommand() 공개 메소드

Shows basic information about which entities exist and possibly if their mapping information contains errors or not. To run a full validation, use the validate command.
public entityStatusCommand ( boolean $dumpMappingData = false, string $entityClassName = null ) : void
$dumpMappingData boolean If set, the mapping data will be output
$entityClassName string If given, the mapping data for just this class will be output
리턴 void

handleException() 보호된 메소드

Output an error message and log the exception.
protected handleException ( Exception $exception ) : void
$exception Exception
리턴 void

injectSettings() 공개 메소드

Injects the Flow settings, only the persistence part is kept for further use
public injectSettings ( array $settings ) : void
$settings array
리턴 void

isDatabaseConfigured() 보호된 메소드

protected isDatabaseConfigured ( )

migrateCommand() 공개 메소드

Adjusts the database structure by applying the pending migrations provided by currently active packages.
public migrateCommand ( string $version = null, string $output = null, boolean $dryRun = false, boolean $quiet = false ) : void
$version string The version to migrate to
$output string A file to write SQL to, instead of executing it
$dryRun boolean Whether to do a dry run or not
$quiet boolean If set, only the executed migration versions will be output, one per line
리턴 void

migrationExecuteCommand() 공개 메소드

Manually runs a single migration in the given direction.
public migrationExecuteCommand ( string $version, string $direction = 'up', string $output = null, boolean $dryRun = false ) : void
$version string The migration to execute
$direction string Whether to execute the migration up (default) or down
$output string A file to write SQL to, instead of executing it
$dryRun boolean Whether to do a dry run or not
리턴 void

migrationGenerateCommand() 공개 메소드

If $diffAgainstCurrent is TRUE (the default), it generates a migration file with the diff between current DB structure and the found mapping metadata. Otherwise an empty migration skeleton is generated. Only includes tables/sequences matching the $filterExpression regexp when diffing models and existing schema. Include delimiters in the expression! The use of --filter-expression '/^acme_com/' would only create a migration touching tables starting with "acme_com". Note: A filter-expression will overrule any filter configured through the Neos.Flow.persistence.doctrine.migrations.ignoredTables setting
public migrationGenerateCommand ( boolean $diffAgainstCurrent = true, string $filterExpression = null ) : void
$diffAgainstCurrent boolean Whether to base the migration on the current schema structure
$filterExpression string Only include tables/sequences matching the filter expression regexp
리턴 void

migrationStatusCommand() 공개 메소드

Displays the migration configuration as well as the number of available, executed and pending migrations.
public migrationStatusCommand ( boolean $showMigrations = false, boolean $showDescriptions = false ) : void
$showMigrations boolean Output a list of all migrations and their status
$showDescriptions boolean Show descriptions for the migrations (enables versions display)
리턴 void

migrationVersionCommand() 공개 메소드

If all is given as version, all available migrations are marked as requested.
public migrationVersionCommand ( string $version, boolean $add = false, boolean $delete = false ) : void
$version string The migration to execute
$add boolean The migration to mark as migrated
$delete boolean The migration to mark as not migrated
리턴 void

updateCommand() 공개 메소드

Updates the database schema without using existing migrations. It will not drop foreign keys, sequences and tables, unless --unsafe-mode is set.
public updateCommand ( boolean $unsafeMode = false, string $output = null ) : void
$unsafeMode boolean If set, foreign keys, sequences and tables can potentially be dropped.
$output string A file to write SQL to, instead of executing the update directly
리턴 void

validateCommand() 공개 메소드

Checks if the current class model schema is valid. Any inconsistencies in the relations between models (for example caused by wrong or missing annotations) will be reported. Note that this does not check the table structure in the database in any way.
public validateCommand ( ) : void
리턴 void

프로퍼티 상세

$doctrineService 보호되어 있는 프로퍼티

protected Service,Neos\Flow\Persistence\Doctrine $doctrineService
리턴 Neos\Flow\Persistence\Doctrine\Service

$packageManager 보호되어 있는 프로퍼티

protected PackageManagerInterface,Neos\Flow\Package $packageManager
리턴 Neos\Flow\Package\PackageManagerInterface

$settings 보호되어 있는 프로퍼티

protected array $settings
리턴 array

$systemLogger 보호되어 있는 프로퍼티

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
리턴 Neos\Flow\Log\SystemLoggerInterface