本文整理汇总了PHP中Installer::installed方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::installed方法的具体用法?PHP Installer::installed怎么用?PHP Installer::installed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::installed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/views/pages/home.ctp)...
*/
// for quick install
$homeParams = Installer::installed() ? array('controller' => 'welcome', 'action' => 'index') : array('controller' => 'install', 'action' => 'index');
Router::connect('/', $homeParams);
Router::connect('/login', array('controller' => 'account', 'action' => 'login'));
Router::connect('/logout', array('controller' => 'account', 'action' => 'logout'));
Router::connect('/projects/:project_id/issues/:action/*', array('controller' => 'issues'));
Router::connect('/projects/:action/:project_id', array('controller' => 'projects'));
Router::connect('/projects/:project_id/news/:action/', array('controller' => 'news'));
Router::connect('/projects/:project_id/news/:action/:id', array('controller' => 'news'));
Router::connect('/projects/:project_id/documents/:action/', array('controller' => 'documents'));
Router::connect('/projects/:project_id/boards/:action/:id/', array('controller' => 'boards'));
Router::connect('/projects/:project_id/timelog/:action/*', array('controller' => 'timelog'), array('project_id' => '.+'));
Router::connect('/projects/:project_id/timelog/:action/:page/:sort/:direction/*', array('controller' => 'timelog'), array('project_id' => '.+'));
Router::connect('/issue_categories/:action/:id/:project_id', array('controller' => 'issue_categories'));
Router::connect('/users/list', array('controller' => 'users', 'action' => 'list_'));
Router::connect('/members/:action/:project_id/', array('controller' => 'members'));
Router::connect('/members/:action/:project_id/:id', array('controller' => 'members'));
# map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
# map.connect 'projects/:project_id/news/:action', :controller => 'news'
# map.connect 'projects/:project_id/documents/:action', :controller => 'documents'
# map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
# map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
#
#ActionController::Routing::Routes.draw do |map|
示例2:
<?php
App::import('Lib', 'Installer');
if (Installer::installed()) {
Configure::write('DisableActions.install', '*');
}
App::import('Lib', 'CandyAutoLoader');
spl_autoload_register('CandyAutoLoader::load');
CandyAutoLoader::uses('Spyc', 'Vendor');
CandyAutoLoader::uses(App::objects('model'), 'Model');