当前位置: 首页>>代码示例>>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;未经允许,请勿转载。