本文整理汇总了PHP中getController函数的典型用法代码示例。如果您正苦于以下问题:PHP getController函数的具体用法?PHP getController怎么用?PHP getController使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getController函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dispCashpayForm
/**
* @brief print account information
*/
function dispCashpayForm()
{
if ($this->module_info->login_required == 'Y') {
if (!Context::get('is_logged')) {
return new Object(-1, 'msg_login_required');
}
}
$oEpayController = getController('epay');
// get products info using cartnos
$reviewOutput = $oEpayController->reviewOrder();
if (!$reviewOutput->toBool()) {
return $reviewOutput;
}
Context::set('transaction_srl', $reviewOutput->transaction_srl);
Context::set('order_srl', $reviewOutput->order_srl);
Context::set('review_form', $reviewOutput->review_form);
Context::set('item_name', $reviewOutput->item_name);
Context::set('price', $reviewOutput->price);
Context::set('purchaser_name', $reviewOutput->purchaser_name);
Context::set('purchaser_email', $reviewOutput->purchaser_email);
Context::set('purchaser_telnum', $reviewOutput->purchaser_telnum);
$obj = new stdClass();
$obj->bank_name = $this->module_info->bank_name;
$obj->account_number = $this->module_info->account_number;
$obj->account_holder = $this->module_info->account_holder;
Context::set('account_info', $obj);
$this->setTemplateFile('start');
}
示例2: moduleUpdate
/**
* Execute update
*
* @return Object
*/
function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
// Add atom act
if (!$oModuleModel->getActionForward('atom')) {
$oModuleController->insertActionForward('rss', 'view', 'atom');
}
// 2007. 10. An additional set of 18 to participate in a service module, add a trigger
if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before')) {
$oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before');
}
// 2007. 10. 19 outputs the trigger before you call to set up rss url
if (!$oModuleModel->getTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after')) {
$oModuleController->insertTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after');
}
if ($oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before')) {
$oModuleController->deleteTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before');
}
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
if (!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'rss', 'controller', 'triggerCopyModule', 'after')) {
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'rss', 'controller', 'triggerCopyModule', 'after');
}
return new Object(0, 'success_updated');
}
示例3: moduleUpdate
/**
* @brief 업데이트 실행
**/
function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
$oDB = DB::getInstance();
// 트리거 일괄 추가
foreach ($this->add_triggers as $trigger) {
if (!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4])) {
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
}
}
if (!$oDB->isColumnExists('alliance_sites', 'title')) {
$oDB->addColumn('alliance_sites', 'title', 'varchar', 250, '', true);
$oDB->addIndex('alliance_sites', 'unique_title', 'title', true);
}
if (!$oDB->isColumnExists('alliance_logs', 'type')) {
$oDB->addColumn('alliance_logs', 'type', 'char', 20, '', true);
}
if (!$oDB->isColumnExists('alliance_contents', 'site_srl')) {
$oDB->addColumn('alliance_contents', 'site_srl', 'number', 11, 0, true);
$oDB->addIndex('alliance_contents', 'idx_site_srl', 'site_srl');
}
if (!$oDB->isColumnExists('alliance_messages', 'title')) {
$oDB->addColumn('alliance_messages', 'title', 'varchar', 250, '', true);
}
/* 2011.03.12 - 연합 정보 테이블의 count 칼럼 제거 */
if ($oDB->isColumnExists('alliance_info', 'count')) {
$oDB->dropColumn('alliance_info', 'count');
}
return new Object(0, 'success_updated');
}
示例4: moduleUpdate
/**
* @brief Execute update
*/
function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
// 2007.10.17 When deleting posts/comments delete the poll as well
if (!$oModuleModel->getTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after');
}
// 2008.04.22 A poll connection to add posts/comments
if (!$oModuleModel->getTrigger('document.insertDocument', 'poll', 'controller', 'triggerInsertDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.insertDocument', 'poll', 'controller', 'triggerInsertDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.insertComment', 'poll', 'controller', 'triggerInsertCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.insertComment', 'poll', 'controller', 'triggerInsertCommentPoll', 'after');
}
if (!$oModuleModel->getTrigger('document.updateDocument', 'poll', 'controller', 'triggerUpdateDocumentPoll', 'after')) {
$oModuleController->insertTrigger('document.updateDocument', 'poll', 'controller', 'triggerUpdateDocumentPoll', 'after');
}
if (!$oModuleModel->getTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after')) {
$oModuleController->insertTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after');
}
return new Object(0, 'success_updated');
}
示例5: dispEposForm
/**
* @brief epay.getPaymentForm 에서 호출됨
*/
function dispEposForm()
{
$oEpayController = getController('epay');
$oNcartModel = getModel('ncart');
$oModuleModel = getModel('module');
$oEposModuleConfig = $oModuleModel->getModuleConfig('epos');
$oEposModel = getModel('epos');
// get products info using cartnos
Context::set('plugin_srl', $this->module_info->module_srl);
$review_args = Context::getRequestVars();
$output = $oEpayController->reviewOrder();
if (!$output->toBool()) {
return $output;
}
Context::set('review_form', $output->review_form);
//$cart_info = $output->cart_info;
$transaction_srl = $output->transaction_srl;
$order_srl = $output->order_srl;
$cavalue = md5($this->module_info->storeid . $order_srl . $output->price . $this->module_info->cubkey);
//Context::set('cart_info', $cart_info);
Context::set('price', $output->price);
Context::set('transaction_srl', $transaction_srl);
Context::set('order_srl', $order_srl);
Context::set('cavalue', $cavalue);
$this->setTemplateFile('formdata');
}
示例6: procErrorLoggerAdminInsertConfig
/**
* 모듈 설정을 저장하는 메소드.
*/
public function procErrorLoggerAdminInsertConfig()
{
// 기존 설정을 가져온다.
$config = $this->getConfig();
// 새로 저장하려는 설정을 가져온다.
$request_args = Context::getRequestVars();
$config->error_types = 0;
if ($request_args->error_type_fatal === 'Y') {
$config->error_types = $config->error_types | E_ERROR;
}
if ($request_args->error_type_warning === 'Y') {
$config->error_types = $config->error_types | E_WARNING;
}
if ($request_args->error_type_notice === 'Y') {
$config->error_types = $config->error_types | E_NOTICE;
}
// 새 모듈 설정을 저장한다.
$oModuleController = getController('module');
$output = $oModuleController->insertModuleConfig('errorlogger', $config);
if ($output->toBool()) {
$this->setMessage('success_registed');
} else {
return $output;
}
if (Context::get('success_return_url')) {
$this->setRedirectUrl(Context::get('success_return_url'));
} else {
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispErrorloggerAdminConfig'));
}
}
示例7: index
/**
*
*/
public function index()
{
$this->layout_assets->addJs("library/bootbox-4.4.0/bootbox.min.js");
$this->layout_assets->addDataTable();
$this->layout_assets->addJs("modulo/" . getController() . "/index.js");
$this->layout_template->view("default", "pages/" . getController() . "/index", array());
}
开发者ID:CarlosAyala,项目名称:midas-codeigniter-modulo-emergencias,代码行数:10,代码来源:marea_roja_desembarco_resultado.php
示例8: dispInstallIntroduce
/**
* @brief Display license messages
**/
function dispInstallIntroduce()
{
$install_config_file = FileHandler::getRealPath('./config/install.config.php');
if (file_exists($install_config_file)) {
include $install_config_file;
if (is_array($install_config)) {
foreach ($install_config as $k => $v) {
$v = $k == 'db_table_prefix' ? $v . '_' : $v;
Context::set($k, $v, true);
}
unset($GLOBALS['__DB__']);
Context::set('install_config', true, true);
$oInstallController =& getController('install');
$output = $oInstallController->procInstall();
if (!$output->toBool()) {
return $output;
}
header("location: ./");
Context::close();
exit;
}
}
Context::set('l', Context::getLangType());
$this->setTemplateFile('introduce');
}
示例9: dispTimelineAdminList
/**
* @brief 타임라인 게시판 목록
* @return void
*/
function dispTimelineAdminList()
{
$oTimelineModel = getModel('timeline');
$oTimelineController = getController('timeline');
// 모든 타임라인 게시판 정보 불러오기
$whole_timeline_info = $oTimelineModel->getWholeTimelineInfo();
$oModuleModel = getModel('module');
$modules_info = array();
// 타임라인 게시판의 모듈 정보 불러오기
foreach ($whole_timeline_info as $key => $val) {
$module_info = $oModuleModel->getModuleInfoByModuleSrl($key);
if ($module_info) {
$modules_info[$key] = new stdClass();
$modules_info[$key]->module_info = $module_info;
$modules_info[$key]->timeline_info = $val;
} else {
$output = $oTimelineController->deleteTimelineInfo($key);
if (!$output->toBool()) {
return $output;
}
}
}
// 데이터 페이징 처리
$oTimelineAdminModel = getAdminModel('timeline');
$output = $oTimelineAdminModel->getPageHandler($modules_info, Context::get('page'));
Context::set('page', $output->page);
Context::set('total_page', $output->total_page);
Context::set('total_count', $output->total_count);
Context::set('modules_info', $output->data);
Context::set('page_navigation', $output->page_navigation);
$this->setTemplateFile('list');
}
示例10: procAroundmapAdminSetApiKey
/**
* @brief 어드민 페이지에서 입력한 옵션 값들 세팅\n
* option values
* - naver_api_key
* - yahoo_api_key
* - sphinx info
**/
function procAroundmapAdminSetApiKey()
{
// 어드민 페이지에서 입력한 옵션값들을 가져온다.
$config->naver_api_key = Context::get('naver_api_key');
$config->yahoo_api_key = Context::get('yahoo_api_key');
$config->useSphinx = Context::get('usesphinx');
$config->serverName = Context::get('servername');
$config->serverPort = Context::get('serverport');
// 가져온 옵션값들을 module config에 저장한다.
$oModuleController =& getController('module');
$oModuleController->insertModuleConfig('aroundmap', $config);
// 기존에 적용된 모듈을 삭제한다.
$apply_module = Context::get('apply_module');
$output = executeQuery('aroundmap.deleteApplyModules');
if (!$output->toBool()) {
return $output;
}
// 어드민 페이지에서 입력한 새로운 모듈을 입력한다.
$modules = explode(',', $apply_module);
for ($i = 0, $c = count($modules); $i < $c; $i++) {
if ($modules[$i] != 0) {
$args->module_srl = $modules[$i];
$output = executeQuery('aroundmap.insertApplyModule', $args);
if (!$output->toBool()) {
return $output;
}
}
}
$this->setMessage('success_applied');
}
示例11: _getWidgetContent
function _getWidgetContent()
{
// Arrange a widget ryeolro
if ($this->module_info->mcontent) {
$cache_file = sprintf("%sfiles/cache/page/%d.%s.m.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType());
$interval = (int) $this->module_info->page_caching_interval;
if ($interval > 0) {
if (!file_exists($cache_file) || filesize($cache_file) < 1) {
$mtime = 0;
} else {
$mtime = filemtime($cache_file);
}
if ($mtime + $interval * 60 > $_SERVER['REQUEST_TIME']) {
$page_content = FileHandler::readFile($cache_file);
$page_content = preg_replace('@<\\!--#Meta:@', '<!--Meta:', $page_content);
} else {
$oWidgetController = getController('widget');
$page_content = $oWidgetController->transWidgetCode($this->module_info->mcontent);
FileHandler::writeFile($cache_file, $page_content);
}
} else {
if (file_exists($cache_file)) {
FileHandler::removeFile($cache_file);
}
$page_content = $this->module_info->mcontent;
}
} else {
$page_content = $this->module_info->content;
}
return $page_content;
}
示例12: moduleInstall
/**
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall()
{
// action forward에 등록
$oModuleController =& getController('module');
$oModuleController->insertActionForward('integration_search', 'view', 'IS');
return new Object();
}
示例13: moduleUpdate
/**
* @brief Execute update
**/
function moduleUpdate()
{
$oModuleModel =& getModel('module');
$oModuleController =& getController('module');
$oDB =& DB::getInstance();
// Save module_srl when auto-saving 15/06/2009
if (!$oDB->isColumnExists("editor_autosave", "module_srl")) {
$oDB->addColumn("editor_autosave", "module_srl", "number", 11);
}
// create an index on module_srl
if (!$oDB->isIndexExists("editor_autosave", "idx_module_srl")) {
$oDB->addIndex("editor_autosave", "idx_module_srl", "module_srl");
}
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
if (!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) {
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
}
if (!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) {
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
}
// 2007. 10. Add an editor trigger on the module addition setup
if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before')) {
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
}
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
if (!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) {
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
}
// 2009. 06. 19 Remove unused trigger
if ($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) {
$oModuleController->deleteTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
}
return new Object(0, 'success_updated');
}
示例14: moduleUpdate
/**
* @brief 업데이트(업그레이드)
*/
function moduleUpdate()
{
$oDB =& DB::getInstance();
$oModuleModel =& getModel('module');
$oModuleController =& getController('module');
if (!$oDB->isColumnExists('purplebook', 'memo1')) {
$oDB->addColumn('purplebook', 'memo1', 'varchar', '250');
}
if (!$oDB->isColumnExists('purplebook', 'memo2')) {
$oDB->addColumn('purplebook', 'memo2', 'varchar', '250');
}
if (!$oDB->isColumnExists('purplebook', 'memo3')) {
$oDB->addColumn('purplebook', 'memo3', 'varchar', '250');
}
if (!$oDB->isIndexExists("purplebook", "idx_memo1")) {
$oDB->addIndex("purplebook", "idx_memo1", array("memo1"));
}
if (!$oDB->isIndexExists("purplebook", "idx_memo2")) {
$oDB->addIndex("purplebook", "idx_memo2", array("memo2"));
}
if (!$oDB->isIndexExists("purplebook", "idx_memo3")) {
$oDB->addIndex("purplebook", "idx_memo3", array("memo3"));
}
if (!$oDB->isIndexExists("purplebook", "idx_node_type")) {
$oDB->addIndex("purplebook", "idx_node_type", array("node_type"));
}
}
示例15: procInstallAdminUpdateIndexModule
function procInstallAdminUpdateIndexModule()
{
if (!Context::get('index_module_srl') || !Context::get('menu_item_srl')) {
return new Object(-1, 'msg_invalid_request');
}
$site_args = new stdClass();
$site_args->site_srl = 0;
$site_args->index_module_srl = Context::get('index_module_srl');
$oModuleController = getController('module');
$oModuleController->updateSite($site_args);
// get menu item info
$menuItemSrl = Context::get('menu_item_srl');
$oMenuAdminModel = getAdminModel('menu');
$output = $oMenuAdminModel->getMenuItemInfo($menuItemSrl);
// update homeSitemap.php cache file
$oMenuAdminController = getAdminController('menu');
$homeMenuCacheFile = $oMenuAdminController->getHomeMenuCacheFile();
if (file_exists($homeMenuCacheFile)) {
include $homeMenuCacheFile;
}
if (!$homeMenuSrl || $homeMenuSrl != $output->menu_srl) {
$oMenuAdminController->makeHomemenuCacheFile($output->menu_srl);
}
$this->setMessage('success_updated');
}