开发工具:
文件大小: 3mb
下载次数: 1
上传时间: 2011-09-18
详细说明: symfony 命令详解 /symfony list 语法: symfony [选项] 任务名 [参数] 选项: –dry-run -n Do a dry run without executing actions. –help -H 显示帮助信息 –quiet -q Do not log messages to standard output. –trace -t Turn on invoke/execute tracing, enable full backtrace. –version -V 显示程序版本 可用的任务: help 显示任务的帮助信息 (简写h) list 列出任务 app:routes 显示一个应用程序当前的路由信息 cache:clear 清空缓存(简写cc, clear-cache) configure:author 设置项目作者 configure:database 设置数据库 DSN generate:app 初始化一个应用程序 (简写init-app) generate:m odule 初始化一个模块 (简写init-module) generate:project 初始化一个项目 (简写init-proj) generate:task Creates a skeleton class for a new task i18n:extract Extracts i18n strings from php files i18n:find Finds non “i18n ready” strings in an application log:clear 清空日志 (log-purge) log:rotate Rotates an application log files (log-rotate) plugin:add-channel 添加一个新的PEAR频道 plugin:install 安装一个插件 (简写plugin-install) plugin:list 列出已安装的插件 (简写plugin-list) plugin:publish-assets 将全部插件的web目录发布到项目的web目录下 plugin:uninstall 卸载一个插件 (plugin-uninstall) plugin:upgrade 升级一个插件(plugin-upgrade) project:clear-controllers Clears all non production environment controllers (clear-controllers) project:deploy 发布一个项目到另外一台服务器 (sync) project:disable 在指定环境下屏蔽一个应用程序 (disable) project:enable 在指定环境下打开一个应用程序 (disable) project:freeze 冻结 symfony 库文件 (简写freeze) project:permissions 修改symfony项目目录的权限 (permissions, fix-perms) project:unfreeze 解冻 symfony 库文件 (简写unfreeze) project:upgrade1.1 将一个symfony项目升级到1.1 project:upgrade1.2 将一个symonfy项目从1.1升级到1.2 propel:build-all 生成model,form,生成sql语句并创建数据库 (propel-build-all) propel:build-all-load 生成model,form,生成sql语句,创建数据库并插入初始数据 (propel-build-all-load) propel:build-filters 根据当前的模型创建过滤器 propel:build-forms 根据当前的模型创建表单 propel:build-model 根据数据库结构创建模型 (propel-build-model) propel:build-schema 根据数据库结构创建schema (propel-build-schema) propel:build-sql 根据当前模型创建一个SQL (简写propel-build-sql) propel:data-dump 导出数据到 fixtures directory (propel-dump-data) propel:data-load 从fixtures directory载入数据 (propel-load-data) propel:generate-admin 自动生成一个module的后台 propel:generate-module Generates a Propel module (propel-generate-crud, propel:generate-crud) propel:generate-module-for-route Generates a Propel module for a route definition propel:graphviz Generates a graphviz chart of current object model propel:init-admin 初始化一个module后台(propel-init-admin) propel:insert-sql Inserts SQL for current model (propel-insert-sql) propel:schema-to-xml 根据schema.yml生成schema.xml (propel-convert-yml-schema) propel:schema-to-yml 根据schema.xml生成schema.yml (propel-convert-xml-schema) test:all 运行全部测试 (简写test-all) test:coverage Outputs test code coverage test:functional 运行全部功能测试 (简写test-functional) test:unit 运行单元测试 (test-unit) ./symfony help app:routes 语法: symfony app:routes application [name] 参数: application The application name name A route name 描述: The app:routes displays the current routes for a given application: ./symfony app:routes frontend ./symfony help cc 语法: symfony cache:clear [--app[="..."]] [--env[="..."]] [--type[="..."]] 别名: cc, clear-cache 选项: –app The application name –env The environment –type The type (default: all) 描述: The cache:clear task clears the symfony cache. By default, it removes the cache for all available types, all applications, and all environments. You can restrict by type, application, or environment: For example, to clear the frontend application cache: ./symfony cache:clear –app=frontend To clear the cache for the prod environment for the frontend application: ./symfony cache:clear –app=frontend –env=prod To clear the cache for all prod environments: ./symfony cache:clear –env=prod To clear the config cache for all prod environments: ./symfony cache:clear –type=config –env=prod The built-in types are: config, i18n, routing, module and template. ./symfony help configure:author 语法: symfony configure:author author 参数: author The project author 描述: The configure:author task configures the author for a project: ./symfony configure:author “Fabien Potencier ” The author is used by the generates to pre-configure the PHPDoc header for each generated file. The value is stored in [config/properties.ini]. ./symfony help configure:database 语法: symfony configure:database [--env[="..."]] [--name[="..."]] [--class[="..."]] [--app[="..."]] dsn [username] [password] 参数: dsn The database dsn username The database username (default: root) password The database password 选项: –env The environment (default: all) –name The connection name (default: propel) –class The database class name (default: sfPropelDatabase) –app The application name 描述: The configure:database task configures the database DSN for a project: ./symfony configure:database mysql:host=localhost;dbname=example root mYsEcret By default, the task change the configuration for all environment. If you want to change the dsn for a specific environment, use the env option: ./symfony configure:database –env=dev mysql:host=localhost;dbname=example_dev root mYsEcret To change the configuration for a specific application, use the app option: ./symfony configure:database –app=frontend mysql:host=localhost;dbname=example root mYsEcret You can also specify the connection name and the database class name: ./symfony configure:database –name=main –class=sfDoctrineDatabase mysql:host=localhost;dbname=example root WARNING: The propel.ini file is also updated when you use a Propel database and configure for all environments with no app. ./symfony help generate:app 语法: symfony generate:app [--escaping-strategy="..."] [--csrf-secret="..."] application 别名: init-app 参数: application The application name 选项: –escaping-strategy Output escaping strategy (default: ) –csrf-secret Secret to use for CSRF protection (default: ) 描述: The generate:app task creates the basic directory structure for a new application in the current project: ./symfony generate:app frontend This task also creates two front controller scripts in the web/ directory: web/%application%.php for the production environment web/%application%_dev.php for the development environment For the first application, the production environment script is named index.php. If an application with the same name already exists, it throws a sfCommandException. You can enable output escaping (to prevent XSS) by using the escaping-strategy option: ./symfony generate:app frontend –escaping-strategy=on You can enable session token in forms (to prevent CSRF) by defining a secret with the csrf-secret option: ./symfony generate:app frontend –csrf-secret=UniqueSecret ./symfony help generate:module 语法: symfony generate:module application module 别名: init-module 参数: application The application name module The module name 描述: The generate:module task creates the basic directory structure for a new module in an existing application: ./symfony generate:module frontend article The task can also change the author name found in the actions.class.php if you have configure it in config/properties.ini: [symfony] name=blog author=Fabien Potencier You can customize the default skeleton used by the task by creating a %sf_data_dir%/skeleton/module directory. The task also creates a functional test stub named %sf_test_dir%/functional/%application%/%module%ActionsTest.class.php that does not pass by default. If a module with the same name already exists in the application, it throws a sfCommandException. ./symfony help generate:project 用方法: symfony generate:project name 别名: init-project 参数: name The project name 描述: The generate:project task creates the basic directory structure for a new project in the current directory: ./symfony generate:project blog If the current directory already contains a symfony project, it throws a sfCommandException. ./symfony help generate:task 语法: symfony generate:task [--dir="..."] [--use-database="..."] [--brief-description="..."] task_name 参数: task_name The task name (can contain namespace) 选项: –dir The directory to create the task in (default: lib/task) –use-database Whether the task needs model initialization to access database (default: propel) –brief-description A brief task description (appears in task list) 描述: The generate:task creates a new sfTask class based on the name passed as argument: ./symfony generate:task namespace:name The namespaceNameTask.class.php skeleton task is created under the lib/task/ directory. Note that the namespace is optional. If you want to create the file in another directory (relative to the project root folder), pass it in the –dir option. This directory will be created if it does not already exist. ./symfony generate:task namespace:name –dir=plugins/myPlugin/lib/task If you want the task to default to a connection other than propel, provide the name of this connection with the –use-database option: ./symfony generate:task namespace:name –use-database=main The –use-database option can also be used to disable database initialization in the generated task: ./symfony generate:task namespace:name –use-database=false You can also specify a description: ./symfony generate:task namespace:name –brief-description=”Does interesting things” ./symfony help i18n:extract 语法: symfony i18n:extract [--display-new] [--display-old] [--auto-save] [--auto-delete] application culture 参数: application The application name culture The target culture 选项: –display-new Output all new found strings –display-old Output all old strings –auto-save Save the new strings –auto-delete Delete old strings 描述: The i18n:extract task extracts i18n strings from your project files for the given application and target culture: ./symfony i18n:extract frontend fr By default, the task only displays the number of new and old strings it found in the current project. If you want to display the new strings, use the –display-new option: ./symfony i18n:extract –display-new frontend fr To save them in the i18n message catalogue, use the –auto-save option: ./symfony i18n:extract –auto-save frontend fr If you want to display strings that are present in the i18n messages catalogue but are not found in the application, use the –display-old option: ./symfony i18n:extract –display-old frontend fr To automatically delete old strings, use the –auto-delete but be careful, especially if you have translations for plugins as they will appear as old strings but they are not: ./symfony i18n:extract –auto-delete frontend fr ./symfony help i18n:find 语法: symfony i18n:find [--env="..."] application 参数: application The application name 选项: –env The environment (default: dev) 描述: The i18n:find task finds non internationalized strings embedded in templates: ./symfony i18n:find frontend This task is able to find non internationalized strings in pure HTML and in PHP code: Non i18n text As the task returns all strings embedded in PHP, you can have some false positive (especially if you use the string syntax for helper arguments). ./symfony help log:clear 语法: symfony log:clear 别名: log-purge 描述: The log:clear task clears all symfony log files: ./symfony log:clear ./symfony help log:rotate 语法: symfony log:rotate [--history="..."] [--period="..."] application env 别名: log-rotate 参数: application The application name env The environment name 选项: –history The maximum number of old log files to keep (default: 10) –period The period in days (default: 7) 描述: The log:rotate task rotates application log files for a given environment: ./symfony log:rotate frontend dev You can specify a period or a history option: ./symfony –history=10 –period=7 log:rotate frontend dev ./symfony help plugin:add-channel 语法: symfony plugin:add-channel name 参数: name The channel name 描述: The plugin:add-channel task adds a new PEAR channel: ./symfony plugin:add-channel symfony.plugins.pear.example.com ./symfony help plugin:install 语法: symfony plugin:install [--stability|-s="..."] [--release|-r="..."] [--channel|-c="..."] [--install_deps|-d] [--force-license] name 别名: plugin-install 参数: name The plugin name 选项: –stability (-s) The preferred stability (stable, beta, alpha) –release (-r) The preferred version –channel (-c) The PEAR channel name –install_deps (-d) Whether to force installation of required dependencies –force-license Whether to force installation even if the license is not MIT like 描述: The plugin:install task installs a plugin: ./symfony plugin:install sfGuardPlugin By default, it installs the latest stable release. If you want to install a plugin that is not stable yet, use the stability option: ./symfony plugin:install –stability=beta sfGuardPlugin ./symfony plugin:install -s beta sfGuardPlugin You can also force the installation of a specific version: ./symfony plugin:install –release=1.0.0 sfGuardPlugin ./symfony plugin:install -r 1.0.0 sfGuardPlugin To force installation of all required dependencies, use the install_deps flag: ./symfony plugin:install –install-deps sfGuardPlugin ./symfony plugin:install -d sfGuardPlugin By default, the PEAR channel used is symfony-plugins (plugins.symfony-project.org). You can specify another channel with the channel option: ./symfony plugin:install –channel=mypearchannel sfGuardPlugin ./symfony plugin:install -c mypearchannel sfGuardPlugin Or you can use the channel/package notation: ./symfony plugin:install mypearchannel/sfGuardPlugin You can also install PEAR packages hosted on a website: ./symfony plugin:install http://somewhere.example.com/sfGuardPlugin-1.0.0.tgz Or local PEAR packages: ./symfony plugin:install /home/fabien/plugins/sfGuardPlugin-1.0.0.tgz If the plugin contains some web content (images, stylesheets or javascripts), the task creates a %name% symbolic link for those assets under web/. On Windows, the task copy all the files to the web/%name% directory. ./symfony help plugin:list 语法: symfony plugin:list 别名: plugin-list 描述: The plugin:list task lists all installed plugins: ./symfony plugin:list It also gives the channel and version for each plugin. ./symfony help plugin:publish-assets 语法: symfony plugin:publish-assets [--core-only] [--symfony-lib-dir="..."] 选项: –core-only If set only core plugins will publish their assets –symfony-lib-dir The symfony lib dir 描述: The plugin:publish-assets task will publish web assets from all plugins. ./symfony plugin:publish-assets In fact this will send the plugin.post_install event to each plugin. ./symfony help plugin:uninstall 语法: symfony plugin:uninstall [--channel|-c="..."] [--install_deps|-d] name 别名: plugin-uninstall 参数: name The plugin name 选项: –channel (-c) The PEAR channel name –install_deps (-d) Whether to force installation of dependencies 描述: The plugin:uninstall task uninstalls a plugin: ./symfony plugin:uninstall sfGuardPlugin The default channel is symfony. You can also uninstall a plugin which has a different channel: ./symfony plugin:uninstall –channel=mypearchannel sfGuardPlugin ./symfony plugin:uninstall -c mypearchannel sfGuardPlugin Or you can use the channel/package notation: ./symfony plugin:uninstall mypearchannel/sfGuardPlugin You can get the PEAR channel name of a plugin by launching the plugin:list] task. If the plugin contains some web content (images, stylesheets or javascripts), the task also removes the [web/%name% symbolic link (on *nix) or directory (on Windows). ./symfony help plugin:upgrade 语法: symfony plugin:upgrade [--stability|-s="..."] [--release|-r="..."] [--channel|-c="..."] name 别名: plugin-upgrade 参数: name The plugin name 选项: –stability (-s) The preferred stability (stable, beta, alpha) –release (-r) The preferred version –channel (-c) The PEAR channel name 描述: The plugin:upgrade task tries to upgrade a plugin: ./symfony plugin:upgrade sfGuardPlugin The default channel is symfony. If the plugin contains some web content (images, stylesheets or javascripts), the task also updates the web/%name% directory content on Windows. See plugin:install for more information about the format of the plugin name and options. ./symfony help project:clear-controllers 语法: symfony project:clear-controllers 别名: clear-controllers 描述: The project:clear-controllers task clears all non production environment controllers: ./symfony project:clear-controllers You can use this task on a production server to remove all front controller scripts except the production ones. If you have two applications named frontend and backend, you have four default controller scripts in web/: index.php frontend_dev.php backend.php backend_dev.php After executing the project:clear-controllers task, two front controller scripts are left in web/: index.php backend.php Those two controllers are safe because debug mode and the web debug toolbar are disabled. ./symfony help project:deploy 语法: symfony project:deploy [--go] [--rsync-dir="..."] [--rsync-options[="..."]] server 别名: sync 参数: server The server name 选项: –go Do the deployment –rsync-dir The directory where to look for rsync*.txt files (default: config) –rsync-options To options to pass to the rsync executable (default: -azC –force –delete) 描述: The project:deploy task deploys a project on a server: ./symfony project:deploy production The server must be configured in config/properties.ini: [production] host=www.example.com port=22 user=fabien dir=/var/www/sfblog/ type=rsync To automate the deployment, the task uses rsync over SSH. You must configure SSH access with a key or configure the password in config/properties.ini. By default, the task is in dry-mode. To do a real deployment, you must pass the –go option: ./symfony project:deploy –go production Files and directories configured in config/rsync_exclude.txt are not deployed: .svn /web/uploads/* /cache/* /log/* You can also create a rsync.txt and rsync_include.txt files. If you need to customize the rsync*.txt files based on the server, you can pass a rsync-dir option: ./symfony project:deploy –go –rsync-dir=config/production production Last, you can specify the options passed to the rsync executable, using the rsync-options option (defaults are -azC): ./symfony project:deploy –go –rsync-options=avz ./symfony help project:disable 语法: symfony project:disable application env 别名: disable 参数: application The application name env The environment name 描述: The project:disable task disables an application for a specific environment: ./symfony project:disable frontend prod ./symfony help project:enable 语法: symfony project:enable application env 别名: enable 参数: application The application name env The environment name 描述: The project:enable task enables an application for a specific environment: ./symfony project:enable frontend prod ./symfony help project:freeze 语法: symfony project:freeze symfony_data_dir 别名: freeze 参数: symfony_data_dir The symfony data directory 描述: The project:freeze task copies all the symfony core files to the current project: ./symfony project:freeze /path/to/symfony/data/directory The task takes a mandatory argument of the path to the symfony data directory. The task also changes config/config.php to switch to the embedded symfony files. ./symfony help project:permissions 语法: symfony project:permissions 别名: permissions, fix-perms 描述: The project:permissions task fixes directory permissions: ./symfony project:permissions ./symfony help project:unfreeze 语法: symfony project:unfreeze 别名: unfreeze 描述: The project:unfreeze task removes all the symfony core files from the current project: ./symfony project:unfreeze The task also changes config/config.php to switch to the old symfony files used before the project:freeze command was used. ./symfony help project:upgrade1.1 语法: symfony project:upgrade1.1 描述: The project:upgrade1.1 task upgrades a symfony project based the 1.0 release to the 1.1 symfony release. ./symfony project:upgrade1.1 Please read the UPGRADE_TO_1_1 file to have information on what does this task. ./symfony help project:upgrade1.2 语法: symfony project:upgrade1.2 描述: The project:upgrade1.2 task upgrades a symfony project based on the 1.1 release to the 1.2 symfony release. ./symfony project:upgrade1.2 Please read the UPGRADE_TO_1_2 file to have information on what does this task. ./symfony help propel:build-all 语法: symfony propel:build-all [--application[="..."]] [--env="..."] [--connection="..."] [--no-confirmation] [--skip-forms|-F] [--classes-only|-C] [--phing-arg="..."] 别名: propel-build-all 选项: –application The application name (default: 1) –env The environment (default: dev) –connection The connection name (default: propel) –no-confirmation Do not ask for confirmation –skip-forms (-F) Skip generating forms –classes-only (-C) Do not initialize the database –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:build-all task is a shortcut for five other tasks: ./symfony propel:build-all The task is equivalent to: ./symfony propel:build-model ./symfony propel:build-forms ./symfony propel:build-filters ./symfony propel:build-sql ./symfony propel:insert-sql See those tasks’ help pages for more information. To bypass confirmation prompts, you can pass the no-confirmation option: ./symfony propel:buil-all –no-confirmation To build all classes but skip initializing the database, use the classes-only option: ./symfony propel:build-all –classes-only ./symfony help propel:build-all-load 语法: symfony propel:build-all-load [--application[="..."]] [--env="..."] [--connection="..."] [--no-confirmation] [--skip-forms|-F] [--classes-only|-C] [--phing-arg="..."] [--append] [--dir="..."] 别名: propel-build-all-load 选项: –application The application name (default: 1) –env The environment (default: dev) –connection The connection name (default: propel) –no-confirmation Do not ask for confirmation –skip-forms (-F) Skip generating forms –classes-only (-C) Do not initialize the database –phing-arg Arbitrary phing argument (multiple values allowed) –append Don’t delete current data in the database –dir The directories to look for fixtures (multiple values allowed) 描述: The propel:build-all-load task is a shortcut for two other tasks: ./symfony propel:build-all-load The task is equivalent to: ./symfony propel:build-all ./symfony propel:data-load See those tasks’ help pages for more information. To bypass the confirmation, you can pass the no-confirmation option: ./symfony propel:buil-all-load –no-confirmation ./symfony help propel:build-filters 语法: symfony propel:build-filters [--connection="..."] [--model-dir-name="..."] [--filter-dir-name="..."] [--application[="..."]] 选项: –connection The connection name (default: propel) –model-dir-name The model dir name (default: model) –filter-dir-name The filter form dir name (default: filter) –application The application name (default: 1) 描述: The propel:build-filters task creates filter form classes from the schema: ./symfony propel:build-filters The task read the schema information in config/*schema.xml and/or config/*schema.yml from the project and all installed plugins. The task use the propel connection as defined in config/databases.yml. You can use another connection by using the –connection option: ./symfony propel:build-filters –connection=”name” The model filter form classes files are created in lib/filter. This task never overrides custom classes in lib/filter. It only replaces base classes generated in lib/filter/base. ./symfony help propel:build-forms 语法: symfony propel:build-forms [--connection="..."] [--model-dir-name="..."] [--form-dir-name="..."] [--application[="..."]] 选项: –connection The connection name (default: propel) –model-dir-name The model dir name (default: model) –form-dir-name The form dir name (default: form) –application The application name (default: 1) 描述: The propel:build-forms task creates form classes from the schema: ./symfony propel:build-forms The task read the schema information in config/*schema.xml and/or config/*schema.yml from the project and all installed plugins. The task use the propel connection as defined in config/databases.yml. You can use another connection by using the –connection option: ./symfony propel:build-forms –connection=”name” The model form classes files are created in lib/form. This task never overrides custom classes in lib/form. It only replaces base classes generated in lib/form/base. ./symfony help propel:build-model 语法: symfony propel:build-model [--phing-arg="..."] 别名: propel-build-model 选项: –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:build-model task creates model classes from the schema: ./symfony propel:build-model The task read the schema information in config/*schema.xml and/or config/*schema.yml from the project and all installed plugins. You mix and match YML and XML schema files. The task will convert YML ones to XML before calling the Propel task. The model classes files are created in lib/model. This task never overrides custom classes in lib/model. It only replaces files in lib/model/om and lib/model/map. ./symfony help propel:build-schema 语法: symfony propel:build-schema [--application[="..."]] [--env="..."] [--connection="..."] [--xml] [--phing-arg="..."] 别名: propel-build-schema 选项: –application The application name (default: 1) –env The environment (default: cli) –connection The connection name –xml Creates an XML schema instead of a YML one –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:build-schema task introspects a database to create a schema: ./symfony propel:build-schema By default, the task creates a YML file, but you can also create a XML file: ./symfony –xml propel:build-schema The XML format contains more information than the YML one. ./symfony help propel:build-sql 语法: symfony propel:build-sql [--phing-arg="..."] 别名: propel-build-sql 选项: –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:build-sql task creates SQL statements for table creation: ./symfony propel:build-sql The generated SQL is optimized for the database configured in config/propel.ini: propel.database = mysql ./symfony help propel:data-dump 语法: symfony propel:data-dump [--application[="..."]] [--env="..."] [--connection="..."] [--classes="..."] [target] 别名: propel-dump-data 参数: target The target filename 选项: –application The application name (default: 1) –env The environement (default: cli) –connection The connection name (default: propel) –classes The class names to dump (separated by a colon) 描述: The propel:data-dump task dumps database data: ./symfony propel:data-dump > data/fixtures/dump.yml By default, the task outputs the data to the standard output, but you can also pass a filename as a second argument: ./symfony propel:data-dump dump.yml The task will dump data in data/fixtures/%target% (data/fixtures/dump.yml in the example). The dump file is in the YML format and can be re-imported by using the propel:data-dump task. By default, the task use the propel connection as defined in config/databases.yml. You can use another connection by using the connection option: ./symfony propel:data-dump –connection=”name” If you only want to dump some classes, use the classes option: ./symfony propel:data-dump –classes=”Article,Category” If you want to use a specific database configuration from an application, you can use the application option: ./symfony propel:data-dump –application=frontend ./symfony help propel:data-load 语法: symfony propel:data-load [--application[="..."]] [--env="..."] [--append] [--connection="..."] [--dir="..."] 别名: propel-load-data 选项: –application The application name (default: 1) –env The environment (default: cli) –append Don’t delete current data in the database –connection The connection name (default: propel) –dir The directories to look for fixtures (multiple values allowed) 描述: The propel:data-load task loads data fixtures into the database: ./symfony propel:data-load The task loads data from all the files found in data/fixtures/. If you want to load data from other directories, you can use the –dir option: ./symfony propel:data-load –dir=”data/fixtures” –dir=”data/data” The task use the propel connection as defined in config/databases.yml. You can use another connection by using the –connection option: ./symfony propel:data-load –connection=”name” If you don’t want the task to remove existing data in the database, use the –append option: ./symfony propel:data-load –append If you want to use a specific database configuration from an application, you can use the application option: ./symfony propel:data-load –application=frontend ./symfony help propel:generate-admin 语法: symfony propel:generate-admin [--module="..."] [--theme="..."] [--singular="..."] [--plural="..."] [--env="..."] application route_or_model 参数: application The application name route_or_model The route name or the model class 选项: –module The module name –theme The theme name (default: admin) –singular The singular name –plural The plural name –env The environment (default: dev) 描述: The propel:generate-admin task generates a Propel admin module: ./symfony propel:generate-admin frontend Article The task creates a module in the %frontend% application for the %Article% model. The task creates a route for you in the application routing.yml. You can also generate a Propel admin module by passing a route name: ./symfony propel:generate-admin frontend article The task creates a module in the %frontend% application for the %article% route definition found in routing.yml. For the filters and batch actions to work properly, you need to add the wildcard option to the route: article: class: sfPropelRouteCollection options: model: Article with_wildcard_routes: true ./symfony help propel:generate-module-for-route 语法: symfony propel:generate-module-for-route [--theme="..."] [--non-verbose-templates] [--singular="..."] [--plural="..."] [--env="..."] application route 参数: application The application name route The route name 选项: –theme The theme name (default: default) –non-verbose-templates Generate non verbose templates –singular The singular name –plural The plural name –env The environment (default: dev) 描述: The propel:generate-module-for-route task generates a Propel module for a route definition: ./symfony propel:generate-module-for-route frontend article The task creates a module in the %frontend% application for the %article% route definition found in routing.yml. ./symfony help propel:graphviz 语法: symfony propel:graphviz [--phing-arg="..."] 选项: –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:graphviz task creates a graphviz DOT visualization for automatic graph drawing of object model: ./symfony propel:graphviz ./symfony help propel:init-admin 语法: symfony propel:init-admin [--theme="..."] application module model 别名: propel-init-admin 参数: application The application name module The module name model The model class name 选项: –theme The theme name (default: default) 描述: The propel:init-admin task generates a Propel admin module: ./symfony propel:init-admin frontend article Article The task creates a %module% module in the %application% application for the model class %model%. The created module is an empty one that inherit its actions and templates from a runtime generated module in %sf_app_cache_dir%/modules/auto%module%. The generator can use a customized theme by using the –theme option: ./symfony propel:init-admin –theme=”custom” frontend article Article ./symfony help propel:insert-sql 语法: symfony propel:insert-sql [--application[="..."]] [--env="..."] [--connection="..."] [--no-confirmation] [--phing-arg="..."] 别名: propel-insert-sql 选项: –application The application name (default: 1) –env The environment (default: cli) –connection The connection name –no-confirmation Do not ask for confirmation –phing-arg Arbitrary phing argument (multiple values allowed) 描述: The propel:insert-sql task creates database tables: ./symfony propel:insert-sql The task connects to the database and executes all SQL statements found in config/sql/*schema.sql files. Before execution, the task will ask you to confirm the execution as it deletes all data in your database. To bypass the confirmation, you can pass the –no-confirmation option: ./symfony propel:insert-sql –no-confirmation The task read the database configuration from `databases.yml`. You can use a specific application/environment by passing an –application or –env option. You can also use the –connection option if you want to only load SQL statements for a given connection. ./symfony help propel:schema-to-xml 语法: symfony propel:schema-to-xml 别名: propel-convert-yml-schema 描述: The propel:schema-to-xml task converts YML schemas to XML: ./symfony propel:schema-to-xml ./symfony help propel:schema-to-yml 语法: symfony propel:schema-to-yml 别名: propel-convert-xml-schema 描述: The propel:schema-to-yml task converts XML schemas to YML: ./symfony propel:schema-to-yml ./symfony help test:all 语法: symfony test:all 别名: test-all 描述: The test:all task launches all unit and functional tests: ./symfony test:all The task launches all tests found in test/. If one or more test fail, you can try to fix the problem by launching them by hand or with the test:unit and test:functional task. ./symfony help test:coverage 语法: symfony test:coverage [--detailed] test_name lib_name 参数: test_name A test file name or a test directory lib_name A lib file name or a lib directory for wich you want to know the coverage 选项: –detailed Output detailed information 描述: The test:coverage task outputs the code coverage given a test file or test directory and a lib file or lib directory for which you want code coverage: ./symfony test:coverage test/unit/model lib/model To output the lines not covered, pass the –detailed option: ./symfony test:coverage –detailed test/unit/model lib/model ./symfony help test:functional 语法: symfony test:functional application [controller1] … [nameN] 别名: test-functional 参数: application The application name controller The controller name 描述: The test:functional task launches functional tests for a given application: ./symfony test:functional frontend The task launches all tests found in test/functional/%application%. You can launch all functional tests for a specific controller by giving a controller name: ./symfony test:functional frontend article You can also launch all functional tests for several controllers: ./symfony test:functional frontend article comment ./symfony help test:unit 使用方法: symfony test:unit [name1] … [nameN] 别名: test-unit 参数: name The test name 描述: The test:unit task launches unit tests: ./symfony test:unit The task launches all tests found in test/unit. You can launch unit tests for a specific name: ./symfony test:unit strtolower You can also launch unit tests for several names: ./symfony test:unit strtolower strtoupper ./symfony -V symfony version 1.2.4-DEV (/home/maker/www/symfony/lib) ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.