本文整理汇总了PHP中pake_task函数的典型用法代码示例。如果您正苦于以下问题:PHP pake_task函数的具体用法?PHP pake_task怎么用?PHP pake_task使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pake_task函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: import_default_tasks
public static function import_default_tasks()
{
pake_desc('Display help on available commands');
pake_task('pakeInteractiveTask::help_pake');
pake_alias('?', 'pakeInteractiveTask::help_pake');
pake_desc('Quit interactive mode');
pake_task('pakeInteractiveTask::quit_pake');
}
示例2: pake_desc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
/**
* @package
* @subpackage Task per importare atti in openparlamento
* @author Guglielmo Celata <guglielmo.celata@depp.it>
*/
pake_desc("import ddl a partire da file yaml");
pake_task('opp-import-ddl-from-yaml', 'project_exists');
pake_desc("update ddl a partire da file yaml");
pake_task('opp-update-ddl-from-yaml', 'project_exists');
pake_desc("prepara uno o più ddl per l'upgrade test");
pake_task('opp-prepare-ddl-for-test', 'project_exists');
/**
* Importa dei ddl a partire da un file yaml
*/
function run_opp_import_ddl_from_yaml($task, $args, $options)
{
static $loaded;
// load application context
if (!$loaded) {
_loader();
}
$dry_run = false;
if (array_key_exists('dry-run', $options)) {
$dry_run = true;
}
if (array_key_exists('yaml-file', $options)) {
示例3: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
pake_desc('synchronise project with another machine');
pake_task('sync', 'project_exists');
function run_sync($task, $args)
{
if (!count($args)) {
throw new Exception('You must provide an environment to synchronize.');
}
$env = $args[0];
$dryrun = isset($args[1]) ? $args[1] : false;
if (!file_exists('config/rsync_exclude.txt')) {
throw new Exception('You must create a rsync_exclude file for your project.');
}
$host = $task->get_property('host', $env);
$dir = $task->get_property('dir', $env);
try {
$user = $task->get_property('user', $env) . '@';
} catch (pakeException $e) {
$user = '';
}
if (substr($dir, -1) != '/') {
$dir .= '/';
}
示例4: pake_desc
*
* usage :
* symfony import-vocabulary {type} {ID} {file path} -d ('delete existing' -- optional)
*
*/
use ImportVocab\ImportVocab;
pake_desc('Import a file into a vocabulary');
pake_task('import-vocabulary');
pake_desc('Import a list of vocabulary files');
pake_task('import-list');
pake_desc('Repair references in an import batch');
pake_task('import-repair');
echo "\n";
//xdebug_break();
//we could also prepend these as arguments, but not today
//define('SF_APP', $app);
//define('SF_ENVIRONMENT', $env);
define('SF_APP', 'frontend');
define('SF_ENVIRONMENT', 'dev');
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_DEBUG', false);
require_once(SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'vendor'. DIRECTORY_SEPARATOR .'autoload.php');
示例5: pake_desc
pake_desc('compile settings');
pake_task('compile-settings', 'project_exists');
pake_alias('cs', 'compile-settings');
pake_desc('compile right');
pake_task('compile-rights', 'project_exists');
pake_alias('cr', 'compile-rights');
pake_desc('create module: <module_name> <lib>');
pake_task('create-module', 'project_exists');
pake_alias('cm', 'create-module');
pake_task('compress-files', 'project_exists');
pake_alias('cf', 'compress-files');
pake_task('newsletter', 'project_exists');
pake_alias('nl', 'newsletter');
pake_task('tags-relations', 'project_exists');
pake_alias('tr', 'tags-relations');
pake_task('url-relations', 'project_exists');
pake_alias('ur', 'url-relations');
function run_compress_files($task, $args)
{
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_APP', 'frontend');
define('SF_ENVIRONMENT', 'prod');
define('SF_DEBUG', false);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
//$files = FileHelper::getSubElements(SF_ROOT_DIR.DIRECTORY_SEPARATOR."www".DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."frontend");
//$files = FileHelper::getSubElements(SF_ROOT_DIR.DIRECTORY_SEPARATOR."www".DIRECTORY_SEPARATOR."js".DIRECTORY_SEPARATOR."backend");
$files = FileHelper::getSubElements(SF_ROOT_DIR . DIRECTORY_SEPARATOR . "www" . DIRECTORY_SEPARATOR . "css");
foreach ($files as $file) {
$ext = strrchr($file, ".");
if ($ext != ".css" || $ext != ".js" || $ext != ".php") {
continue;
示例6: pake_task
<?php
pake_task('dm', 'project_exists');
pake_task('di', 'project_exists');
pake_task('dis', 'project_exists');
pake_task('dt', 'project_exists');
function run_dm($task, $args)
{
ini_set("memory_limit", "6146M");
ini_set("display_errors", 1);
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_APP', 'frontend');
define('SF_ENVIRONMENT', 'prod');
define('SF_DEBUG', true);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
$databaseManager = new sfDatabaseManager();
$databaseManager->initialize();
sfConfig::set('sf_cache_objects', false);
sfConfig::set('sf_cache_relations', false);
sfConfig::set('sf_use_relations_cache', false);
$c = new Criteria();
//$c->add(ImportSessionPeer::CREATED_AT, "2014-10-12", Criteria::GREATER_THAN);
//$c->add(ImportSessionPeer::IMPORT_ID, null, Criteria::ISNOTNULL);
$c->addJoin(ImportSessionPeer::IMPORT_ID, ImportPeer::ID, Criteria::LEFT_JOIN);
$c->add(ImportPeer::SYSTEM, 3);
$c->add(ImportSessionPeer::CREATED_AT, "2014-11-21", Criteria::GREATER_EQUAL);
$importSessions = ImportSessionPeer::doSelect($c);
$i = 1;
foreach ($importSessions as $importSession) {
$res = Document::getChildrenOf($importSession->getId(), "SearchMatch");
foreach ($res as $r) {
示例7: load_pakefile
public function load_pakefile()
{
pake_desc('Run server. usage: aip app [config.yaml]');
pake_task('MFS\\AppServer\\Runner\\RunnerApp::app');
}
示例8: pake_desc
<?php
// Task description
pake_desc('synchronize a physical folder content with the asset library');
pake_task('sfassetlibrary-synchronize', 'project_exists');
pake_alias('sfals', 'sfassetlibrary-synchronize');
/**
*
* @param object $task
* @param array $args
*/
function run_sfassetlibrary_synchronize($task, $args, $options)
{
if (!count($args)) {
sfAssetsLibraryTools::log('Usage: php symfony sfassetlibrary-synchronize [app] [dirname] --notVerbose --removeOrphanAssets --removeOrphanFolders');
return;
}
$app = $args[0];
if (!is_dir(sfConfig::get('sf_app_dir') . DIRECTORY_SEPARATOR . $app)) {
throw new Exception('The app "' . $app . '" does not exist.');
}
if (!isset($args[1])) {
throw new Exception('You must define a sychronization folder');
}
$base_folder = $args[1];
$verbose = array_key_exists('notVerbose', $options) ? false : true;
$removeOrphanAssets = array_key_exists('removeOrphanAssets', $options) ? true : false;
$removeOrphanFolders = array_key_exists('removeOrphanFolders', $options) ? true : false;
// define constants
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_APP', $app);
示例9: import_default_tasks
public static function import_default_tasks()
{
pake_desc('launch project test suite');
pake_task('pakeSimpletestTask::test');
}
示例10: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
pake_desc('freeze symfony libraries');
pake_task('freeze', 'project_exists');
pake_desc('unfreeze symfony libraries');
pake_task('unfreeze', 'project_exists');
function run_freeze($task, $args)
{
// check that the symfony librairies are not already freeze for this project
if (is_readable(sfConfig::get('sf_lib_dir') . '/symfony')) {
throw new Exception('You can only freeze when lib/symfony is empty.');
}
if (is_readable(sfConfig::get('sf_data_dir') . '/symfony')) {
throw new Exception('You can only freeze when data/symfony is empty.');
}
if (is_readable(sfConfig::get('sf_web_dir') . '/sf')) {
throw new Exception('You can only freeze when web/sf is empty.');
}
if (is_link(sfConfig::get('sf_web_dir') . '/sf')) {
pake_remove(sfConfig::get('sf_web_dir') . '/sf', '');
}
$symfony_lib_dir = sfConfig::get('sf_symfony_lib_dir');
$symfony_data_dir = sfConfig::get('sf_symfony_data_dir');
pake_echo_action('freeze', 'freezing lib found in "' . $symfony_lib_dir . '"');
示例11: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
pake_desc('initialize a new propel admin module');
pake_task('propel-init-admin', 'app_exists');
function run_propel_init_admin($task, $args)
{
if (count($args) < 2) {
throw new Exception('You must provide your module name.');
}
if (count($args) < 3) {
throw new Exception('You must provide your model class name.');
}
$app = $args[0];
$module = $args[1];
$model_class = $args[2];
$theme = isset($args[3]) ? $args[3] : 'default';
try {
$author_name = $task->get_property('author', 'symfony');
} catch (pakeException $e) {
$author_name = 'Your name here';
}
$constants = array('PROJECT_NAME' => $task->get_property('name', 'symfony'), 'APP_NAME' => $app, 'MODULE_NAME' => $module, 'MODEL_CLASS' => $model_class, 'AUTHOR_NAME' => $author_name, 'THEME' => $theme);
$moduleDir = sfConfig::get('sf_root_dir') . '/' . sfConfig::get('sf_apps_dir_name') . '/' . $app . '/' . sfConfig::get('sf_app_module_dir_name') . '/' . $module;
// create module structure
示例12: pake_desc
pake_desc('create schema.xml from schema.yml');
pake_task('propel-convert-yml-schema', 'project_exists');
pake_desc('create schema.yml from schema.xml');
pake_task('propel-convert-xml-schema', 'project_exists');
pake_desc('load data from fixtures directory');
pake_task('propel-load-data', 'project_exists');
pake_desc('dump data to fixtures directory');
pake_task('propel-dump-data', 'project_exists');
pake_desc('create database for current model');
pake_task('propel-build-db', 'project_exists');
pake_desc('insert sql for current model');
pake_task('propel-insert-sql', 'project_exists');
pake_desc('generate propel model and sql and initialize database');
pake_task('propel-build-all', 'propel-build-model', 'propel-build-sql', 'propel-insert-sql');
pake_desc('generate propel model and sql and initialize database, and load data');
pake_task('propel-build-all-load', 'propel-build-all', 'propel-load-data');
function run_propel_convert_yml_schema($task, $args)
{
_propel_convert_yml_schema(true);
}
function run_propel_convert_xml_schema($task, $args)
{
_propel_convert_xml_schema(true);
}
function _propel_convert_yml_schema($check_schema = true, $prefix = '')
{
$finder = pakeFinder::type('file')->name('*schema.yml');
$dirs = array('config');
if ($pluginDirs = glob(sfConfig::get('sf_root_dir') . '/plugins/*/config')) {
$dirs = array_merge($dirs, $pluginDirs);
}
示例13: pake_desc
<?php
pake_desc('Listado de Usuarios');
pake_task('alba-list-users', 'project_exists');
pake_desc('Limpiar archivos temporales');
pake_task('alba-clear-temp', 'project_exists');
pake_desc('[ALBA-fix] dump data to fixtures directory');
pake_task('alba-dump-data', 'project_exists');
pake_desc('[ALBA-fix] load data to fixtures directory');
pake_task('alba-load-data', 'project_exists');
function run_alba_list_users($task, $args)
{
// define constants
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_APP', 'principal');
define('SF_ENVIRONMENT', 'prod');
define('SF_DEBUG', true);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
$databaseManager = new sfDatabaseManager();
$databaseManager->initialize();
$users = UsuarioPeer::doSelect(new Criteria());
foreach ($users as $user) {
pake_echo_action($user->getId(), $user->getUsuario() . " [" . $user->getEmail() . "]");
}
}
function run_alba_clear_temp($task, $args)
{
pake_echo_action('Limpiando archivos temporales...', 'Ok');
pake_echo_action("NO IMPLEMENTADO AUN");
}
/**
示例14: pake_import
<?php
pake_import('pear');
pake_desc('package and install current snapshot');
pake_task('install', 'pear_package');
pake_desc('run Demo-application');
pake_task('demo');
function run_install()
{
pake_superuser_sh('pear install -f AppServer-0.2.2.tgz');
}
function run_demo()
{
pake_sh('aip app ' . realpath(__DIR__ . '/examples/new/config.yaml'), true);
}
示例15: pake_task
pake_task('eZExtBuilder\\BuildTasks::update-package-xml');
pake_task('eZExtBuilder\\BuildTasks::generate-documentation');
pake_task('eZExtBuilder\\BuildTasks::generate-md5sums');
pake_task('eZExtBuilder\\BuildTasks::generate-package-filelist');
pake_task('eZExtBuilder\\BuildTasks::dist');
pake_task('eZExtBuilder\\BuildTasks::build-dependencies');
/*
pake_desc( 'Creates an ezpackage tarball.' );
pake_task( 'generate-package-tarball', 'update-package-xml', 'generate-package-filelist' );
*/
pake_task('eZExtBuilder\\BuildTasks::fat-dist');
pake_task('eZExtBuilder\\BuildTasks::generate-sample-package-xml');
pake_task('eZExtBuilder\\BuildTasks::clean-all', 'clean', 'dist-clean');
pake_task('eZExtBuilder\\BuildTasks::clean');
pake_task('eZExtBuilder\\BuildTasks::dist-clean');
pake_task('eZExtBuilder\\ReportTasks::all-code-reports', 'code-quality-reports', 'code-metrics-reports');
pake_task('eZExtBuilder\\ReportTasks::code-quality-reports', 'coding-style-report', 'code-mess-report', 'copy-paste-report', 'dead-code-report');
pake_task('eZExtBuilder\\ReportTasks::code-mess-report');
pake_task('eZExtBuilder\\ReportTasks::coding-style-report');
pake_task('eZExtBuilder\\ReportTasks::copy-paste-report');
pake_task('eZExtBuilder\\ReportTasks::dead-code-report');
pake_task('eZExtBuilder\\ReportTasks::code-metrics-reports', 'php-loc-report', 'php-pdepend-report');
pake_task('eZExtBuilder\\ReportTasks::php-loc-report');
pake_task('eZExtBuilder\\ReportTasks::php-pdepend-report');
pake_task('eZExtBuilder\\GenericTasks::tool-version');
pake_task('eZExtBuilder\\GenericTasks::show-properties');
pake_task('eZExtBuilder\\GenericTasks::list-extensions');
pake_task('eZExtBuilder\\GenericTasks::generate-extension-config');
pake_task('eZExtBuilder\\GenericTasks::download-extension-config');
pake_task('eZExtBuilder\\GenericTasks::convert-configuration');
}