本文整理汇总了PHP中pake_task函数的典型用法代码示例。如果您正苦于以下问题:PHP pake_task函数的具体用法?PHP pake_task怎么用?PHP pake_task使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pake_task函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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');
}
开发者ID:JasonWayne,项目名称:markdown-resume,代码行数:8,代码来源:pakeInteractiveTask.class.php
示例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 <[email protected]>
*/
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)) {
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:31,代码来源:oppImportTasks.php
示例3: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
* 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 .= '/';
}
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:31,代码来源:sfPakeEnvironment.php
示例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');
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:30,代码来源:importVocabulary.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;
开发者ID:kotow,项目名称:work,代码行数:31,代码来源:sfPakeMisc.php
示例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) {
开发者ID:kotow,项目名称:work,代码行数:31,代码来源:sfPakeDev.php
示例7: load_pakefile
public function load_pakefile()
{
pake_desc('Run server. usage: aip app [config.yaml]');
pake_task('MFS\\AppServer\\Runner\\RunnerApp::app');
}
开发者ID:piotras,项目名称:appserver-in-php,代码行数:5,代码来源:RunnerApp.class.php
示例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);
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:sfPakeSynchronizeTask.class.php
示例9: import_default_tasks
public static function import_default_tasks()
{
pake_desc('launch project test suite');
pake_task('pakeSimpletestTask::test');
}
开发者ID:rosko,项目名称:pake,代码行数:5,代码来源:pakeSimpletestTask.class.php
示例10: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
* 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 . '"');
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:31,代码来源:sfPakeSymfony.php
示例11: pake_desc
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
* 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
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:31,代码来源:sfPakePropelAdminGenerator.php
示例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);
}
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:sfPakePropel.php
示例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");
}
/**
开发者ID:mediasadc,项目名称:alba,代码行数:31,代码来源:alba.php
示例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);
}
开发者ID:piotras,项目名称:appserver-in-php,代码行数:15,代码来源:Pakefile.php
示例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');
}
开发者ID:gggeek,项目名称:ezextensionbuilder,代码行数:31,代码来源:pakefile.php
示例16: pake_desc
<?php
pake_desc('Register Facebook users for later linking');
pake_task('facebook-register-users');
function run_facebook_register_users($task, $args)
{
if (!count($args)) {
throw new Exception('You must provide an application.');
}
$app = $args[0];
define('SF_ROOT_DIR', sfConfig::get('sf_root_dir'));
define('SF_APP', $app);
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
sfContext::getInstance();
$sfGuardUsers = sfFacebookConnect::getNonRegisteredUsers();
echo count($sfGuardUsers) . " non registered users in your database\n";
$chunks = array_chunk($sfGuardUsers, 50);
$num_registered = 0;
foreach ($chunks as $chunk) {
$num_registered += sfFacebookConnect::registerUsers($chunk);
echo $num_registered . " registered.\n";
}
}
开发者ID:vcgato29,项目名称:poff,代码行数:23,代码来源:sfFacebookConnectRegisterUsersTask.php
示例17: pake_import
<?php
pake_import('pear', false);
pake_task('default');
pake_alias('init_mvc', 'default');
pake_alias('reinit_db', 'default');
// TASKS
function run_default($task, $args)
{
pake_echo_error('Installer is a separate tool now. Please use that');
try {
pake_which('mvc_install');
pake_echo_comment('It is already installed on your system. Type: mvc_install');
} catch (pakeException $e) {
pake_echo_comment('I will install it for you…');
pakePearTask::install_pear_package('midgardmvc_installer', 'pear.indeyets.pp.ru');
pake_echo_comment('Done. To use it, type: mvc_install');
}
}
开发者ID:bergie,项目名称:midgardmvc_core,代码行数:19,代码来源:Pakefile.php
示例18: pake_echo_comment
}
pake_echo_comment("oops… you're using installed pake. restarting with local version…");
pake_sh(escapeshellarg($php_exec) . ' ' . escapeshellarg(dirname(__FILE__) . '/bin/pake.php') . $force_tty . $args, true);
die;
} else {
pake_echo_comment("using local version of pake. good!");
}
/* registration */
pake_import('simpletest');
pake_import('pear');
pake_task('compact');
pake_task('phar');
pake_task('release');
pake_task('create_package_xml');
pake_task('obs');
pake_task('foo');
/**
* Demo-task
*
* @param string $task
* @param string $args
* @return bool
* @author Alexey Zakhlestin
*/
function run_foo($task, $args)
{
$age = pake_input('How old are you?');
pake_echo_comment("You are " . $age);
// throw new Exception('test');
}
/* tasks */
开发者ID:rosko,项目名称:pake,代码行数:31,代码来源:pakefile.php
示例19: killWorker
if (isRunWorker($id)) {
killWorker($id);
}
startWorker($id);
}
}
pake_desc("Hard stop all gearman workers");
pake_task("stop_workers");
function run_stop_workers()
{
$out = "";
@pake_sh("pgrep -f worker.php | xargs kill");
pake_echo(print_r($out, true));
}
pake_desc("Check is need run wokers and start it");
pake_task("worker_monitor");
function run_worker_monitor()
{
$workerStarter = Job_Monitor_Factory::createWorkerStarter();
if (!$workerStarter->isRun()) {
Api_Core_Application::log("Не запущенны воркеры", null, Api_Component_Log_Logger::LEVEL_ERROR);
run_restart_workers();
}
}
function isRunWorker($id)
{
$pidfile = RUNTIME_PATH . getWorkerPidFile($id);
return file_exists($pidfile);
}
function startWorker($id)
{
开发者ID:otis22,项目名称:reserve-copy-system,代码行数:31,代码来源:Pakefile.php
示例20: pake_desc
<?php
pake_desc('promote a user super administrator');
pake_task('promote-super-admin', 'project_exists');
function run_promote_super_admin($task, $args)
{
if (!count($args)) {
throw new Exception('You must provide a user name.');
}
$username = $args[0];
throw new Exception('This task is not yet implemented.');
}
开发者ID:sgrove,项目名称:cothinker,代码行数:12,代码来源:sfGuardSuperAdminTask.php
注:本文中的pake_task函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论