PHP 클래스 Neos\Kickstarter\Command\KickstartCommandController

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

보호된 프로퍼티들

프로퍼티 타입 설명
$generatorService Neos\Kickstarter\Service\GeneratorService
$packageManager Neos\Flow\Package\PackageManagerInterface

공개 메소드들

메소드 설명
actionControllerCommand ( string $packageKey, string $controllerName, boolean $generateActions = false, boolean $generateTemplates = true, boolean $generateRelated = false, boolean $force = false ) : string Kickstart a new action controller
commandControllerCommand ( string $packageKey, string $controllerName, boolean $force = false ) : string Kickstart a new command controller
documentationCommand ( string $packageKey ) : string Kickstart documentation
modelCommand ( string $packageKey, string $modelName, boolean $force = false ) : string Kickstart a new domain model
packageCommand ( string $packageKey ) : string Kickstart a new package
repositoryCommand ( string $packageKey, string $modelName, boolean $force = false ) : string Kickstart a new domain repository

보호된 메소드들

메소드 설명
validateModelName ( string $modelName ) : boolean Check the given model name to be not one of the reserved words of PHP.
validatePackageKey ( string $packageKey ) : void Checks the syntax of the given $packageKey and quits with an error message if it's not valid

메소드 상세

actionControllerCommand() 공개 메소드

Generates an Action Controller with the given name in the specified package. In its default mode it will create just the controller containing a sample indexAction. By specifying the --generate-actions flag, this command will also create a set of actions. If no model or repository exists which matches the controller name (for example "CoffeeRepository" for "CoffeeController"), an error will be shown. Likewise the command exits with an error if the specified package does not exist. By using the --generate-related flag, a missing package, model or repository can be created alongside, avoiding such an error. By specifying the --generate-templates flag, this command will also create matching Fluid templates for the actions created. This option can only be used in combination with --generate-actions. The default behavior is to not overwrite any existing code. This can be overridden by specifying the --force flag.
public actionControllerCommand ( string $packageKey, string $controllerName, boolean $generateActions = false, boolean $generateTemplates = true, boolean $generateRelated = false, boolean $force = false ) : string
$packageKey string The package key of the package for the new controller with an optional subpackage, (e.g. "MyCompany.MyPackage/Admin").
$controllerName string The name for the new controller. This may also be a comma separated list of controller names.
$generateActions boolean Also generate index, show, new, create, edit, update and delete actions.
$generateTemplates boolean Also generate the templates for each action.
$generateRelated boolean Also create the mentioned package, related model and repository if neccessary.
$force boolean Overwrite any existing controller or template code. Regardless of this flag, the package, model and repository will never be overwritten.
리턴 string

commandControllerCommand() 공개 메소드

Creates a new command controller with the given name in the specified package. The generated controller class already contains an example command.
public commandControllerCommand ( string $packageKey, string $controllerName, boolean $force = false ) : string
$packageKey string The package key of the package for the new controller
$controllerName string The name for the new controller. This may also be a comma separated list of controller names.
$force boolean Overwrite any existing controller.
리턴 string

documentationCommand() 공개 메소드

Generates a documentation skeleton for the given package.
public documentationCommand ( string $packageKey ) : string
$packageKey string The package key of the package for the documentation
리턴 string

modelCommand() 공개 메소드

This command generates a new domain model class. The fields are specified as a variable list of arguments with field name and type separated by a colon (for example "title:string" "size:int" "type:MyType").
public modelCommand ( string $packageKey, string $modelName, boolean $force = false ) : string
$packageKey string The package key of the package for the domain model
$modelName string The name of the new domain model class
$force boolean Overwrite any existing model.
리턴 string

packageCommand() 공개 메소드

Creates a new package and creates a standard Action Controller and a sample template for its Index Action. For creating a new package without sample code use the package:create command.
public packageCommand ( string $packageKey ) : string
$packageKey string The package key, for example "MyCompany.MyPackageName"
리턴 string

repositoryCommand() 공개 메소드

This command generates a new domain repository class for the given model name.
public repositoryCommand ( string $packageKey, string $modelName, boolean $force = false ) : string
$packageKey string The package key
$modelName string The name of the domain model class
$force boolean Overwrite any existing repository.
리턴 string

validateModelName() 보호된 메소드

Check the given model name to be not one of the reserved words of PHP.
또한 보기: http://www.php.net/manual/en/reserved.keywords.php
protected validateModelName ( string $modelName ) : boolean
$modelName string
리턴 boolean

validatePackageKey() 보호된 메소드

Checks the syntax of the given $packageKey and quits with an error message if it's not valid
protected validatePackageKey ( string $packageKey ) : void
$packageKey string
리턴 void

프로퍼티 상세

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

protected GeneratorService,Neos\Kickstarter\Service $generatorService
리턴 Neos\Kickstarter\Service\GeneratorService

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

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