當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Installer::installed方法代碼示例

本文整理匯總了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|
開發者ID:hiromi2424,項目名稱:candycane_clone,代碼行數:31,代碼來源:routes.php

示例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');
開發者ID:hiromi2424,項目名稱:candycane_clone,代碼行數:10,代碼來源:bootstrap.php


注:本文中的Installer::installed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。