本文整理汇总了PHP中Dispatcher::Instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Dispatcher::Instance方法的具体用法?PHP Dispatcher::Instance怎么用?PHP Dispatcher::Instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dispatcher
的用法示例。
在下文中一共展示了Dispatcher::Instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ParseTemplate
function ParseTemplate($data = NULL)
{
if ($this->Pesan) {
$this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
$this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $this->Pesan);
$this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $this->css);
}
//tentukan value judul, button dll sesuai pilihan bahasa
$this->mrTemplate->AddVar('content', 'TITLE', 'REGISTER MODULE');
$this->mrTemplate->AddVar('content', 'JUDUL_DATA', 'Email Template Data');
$this->mrTemplate->AddVar('content', strtoupper($this->aktif) . '_SELECTED', 'selected');
$this->mrTemplate->AddVar('content', 'LABEL_ACTION', isset($_GET['dataId']) ? 'Update' : 'Add');
if (empty($data['dataSheet'])) {
$this->mrTemplate->AddVar('data', 'DATA_EMPTY', 'YES');
return NULL;
} else {
$this->mrTemplate->AddVar('data', 'DATA_EMPTY', 'NO');
}
$i = 1;
foreach ($data['dataSheet'] as $value) {
$data = $value;
$data['number'] = $i;
$data['class_name'] = $i % 2 == 0 ? '' : 'table-common-even';
$data['url_detail'] = Dispatcher::Instance()->GetUrl('gtfw_module', 'gtfwSubModule', 'view', 'html') . "&moduleName=" . $data['module'] . "";
$this->mrTemplate->AddVars('data_item', $data, '');
$this->mrTemplate->parseTemplate('data_item', 'a');
$i++;
}
}
示例2: ParseTemplate
function ParseTemplate($data = NULL)
{
extract($data);
$url_search = Dispatcher::Instance()->GetUrl('kelompok', 'Kelompok', 'view', 'html');
////////ADD/////////////////////////////////////////////////////////////////////
$url_add = Dispatcher::Instance()->GetUrl('kelompok', 'AddKelompok', 'view', 'html');
// parse string ke dalam template dengan nama URL_ADD
$this->mrTemplate->AddVar('content', 'URL_ADD', $url_add);
////////EDIT/////////////////////////////////////////////////////////////////////
$url_edit = Dispatcher::Instance()->GetUrl('kelompok', 'EditKelompok', 'view', 'html');
////////DELETE/////////////////////////////////////////////////////////////////////
$urlAccept = 'kelompok|DeleteKelompok|do|json';
$urlReturn = 'kelompok|Kelompok|view|html';
$label_delete = 'Kelompok';
$message_delete = 'Penghapusan Data ini akan menghapus Data secara permanen.';
$this->mrTemplate->AddVar('content', 'URL_SEARCH', $url_search);
$this->mrTemplate->AddVars('content', $request_data);
if (empty($data_list)) {
$this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'YES');
} else {
$this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'NO');
foreach ($data_list as $list) {
$list['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $list['id'] . '&label=' . $label_delete . '&dataName=' . $list['nama'] . '&message=' . $message_delete;
$list['nomor'] = $start;
$list['url_edit'] = $url_edit . '&data_id=' . Dispatcher::Instance()->Encrypt($list['id']);
$this->mrTemplate->AddVars('data_list', $list);
$this->mrTemplate->parseTemplate('data_list', 'a');
$start++;
}
}
}
示例3: ParseTemplate
function ParseTemplate($data = NULL)
{
$cur_mod = $dispt->mModule;
$cur_sub_mod = $dispt->mSubmodule;
if (empty($data)) {
$this->mrTemplate->addVar('menulist', 'MENU_DESC', 'No demo is available!');
$this->mrTemplate->addVar('menulist', 'MENU_URL', '#');
} else {
foreach ($data as $key => $value) {
if (Security::Instance()->mSecurityEnabled) {
$allow = Security::Instance()->AllowedToAccess($value['Module'], $value['SubModule'], 'view', $value['Type']);
} else {
$allow = true;
}
if ($value['Module'] == $cur_mod && $value['SubModule'] == $cur_sub_mod) {
$this->mrTemplate->addVar('menulist', 'STRONG_OPEN', '<strong>');
$this->mrTemplate->addVar('menulist', 'STRONG_CLOSE', '</strong>');
} else {
$this->mrTemplate->addVar('menulist', 'STRONG_OPEN', '');
$this->mrTemplate->addVar('menulist', 'STRONG_CLOSE', '');
}
if ($allow) {
$this->mrTemplate->addVar('menulist', 'MENU_NAME', $value['MenuName']);
$this->mrTemplate->addVar('menulist', 'MENU_DESC', $value['Description']);
$this->mrTemplate->addVar('menulist', 'MENU_URL', Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl($value['Module'], $value['SubModule'], 'view', $value['Type']));
$this->mrTemplate->parseTemplate('menulist', 'a');
}
}
}
}
示例4: NusoapResponse
function NusoapResponse()
{
// force to set global variable $debug
// before calling parent constructor
$GLOBALS['debug'] = $this->mDebugMode;
parent::soap_server();
$this->configureWsdl(__CLASS__ . 'Service', FALSE, $this->mEndpoint);
$this->mrDispatcher = Dispatcher::Instance();
$this->mrSecurity = Security::Instance();
$this->mrSession = Session::Instance();
if (!empty($this->mRegisteredFunctions)) {
foreach ($this->mRegisteredFunctions as $func_name => $params) {
if (is_array($params) && $params != NULL) {
$this->register($func_name, $params['in'], $params['out'], $params['namespace'], $params['soapaction'], $params['style'], $params['use'], $params['documentation'], $params['encodingStyle']);
} else {
$this->register($func_name);
}
}
}
if (!empty($this->mRegisteredTypes)) {
foreach ($this->mRegisteredTypes as $type_name => $params) {
if (is_array($params) && count($params) > 0) {
if ($params['type'] == 'complexType' && $params['phptype'] != 'scalar') {
$this->wsdl->addComplexType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
} else {
$this->wsdl->addSimpleType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
}
} else {
$this->register($func_name);
}
}
}
$this->wsdl->addComplexType('ListType', 'complexType', 'array');
$this->wsdl->addComplexType('AgmListType', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:integer[]')), 'xsd:integer');
}
示例5: __construct
function __construct($connectionNumber = 0)
{
$this->mObj = new Anggota($connectionNumber);
$this->url_view = Dispatcher::Instance()->GetUrl('anggota', 'Anggota', 'view', 'html');
$this->url_add = Dispatcher::Instance()->GetUrl('anggota', 'AddAnggota', 'view', 'html');
$this->url_edit = Dispatcher::Instance()->GetUrl('anggota', 'EditAnggota', 'view', 'html');
}
示例6: ParseTemplate
function ParseTemplate($data = null)
{
extract($data);
$url_search = Dispatcher::Instance()->GetUrl('anggota', 'Anggota', 'view', 'html');
$url_add = Dispatcher::Instance()->GetUrl('anggota', 'AddAnggota', 'view', 'html');
$url_edit = Dispatcher::Instance()->GetUrl('anggota', 'EditAnggota', 'view', 'html');
$this->mrTemplate->AddVar('content', 'URL_SEARCH', $url_search);
$this->mrTemplate->AddVar('content', 'URL_ADD', $url_add);
$this->mrTemplate->AddVars('content', $request_data);
if (empty($data_list)) {
$this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'YES');
} else {
$urlAccept = 'anggota|DeleteAnggota|do|json';
$urlReturn = 'anggota|Anggota|view|html';
$label_delete = 'Anggota';
$message_delete = 'Penghapusan Data ini akan menghapus Data secara permanen.';
$this->mrTemplate->AddVar('data_grid', 'DATA_EMPTY', 'NO');
foreach ($data_list as $list) {
$list['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $list['id'] . '&label=' . $label_delete . '&dataName=' . $list['nama'] . ' | ' . $list['kelompok_nama'] . '&message=' . $message_delete;
$list['nomor'] = $start;
$list['url_edit'] = $url_edit . '&data_id=' . Dispatcher::Instance()->Encrypt($list['id']);
$this->mrTemplate->AddVars('data_list', $list);
$this->mrTemplate->parseTemplate('data_list', 'a');
$start += 1;
}
}
if ($message) {
$this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
$this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $message);
$this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $style);
}
}
示例7: __construct
function __construct($connectionNumber = 0)
{
$this->mObj = new Kelompok();
$this->url_add = Dispatcher::Instance()->GetUrl('kelompok', 'AddKelompok', 'view', 'html');
$this->url_edit = Dispatcher::Instance()->GetUrl('kelompok', 'EditKelompok', 'view', 'html');
$this->url_view = Dispatcher::Instance()->GetUrl('kelompok', 'Kelompok', 'view', 'html');
}
示例8: ParseTemplate
function ParseTemplate($data = NULL)
{
if (is_array($data)) {
extract($data);
}
$this->mrTemplate->addVar('content', 'URL', Dispatcher::Instance()->GetCurrentUrl());
}
示例9: ParseTemplate
function ParseTemplate($data = NULL)
{
$this->mrTemplate->AddVar('content', 'URL_SEARCH', Dispatcher::Instance()->GetUrl('gtfw_group', 'group', 'view', 'html'));
$this->mrTemplate->AddVar('content', 'GROUP_URL_ADD', Dispatcher::Instance()->GetUrl('gtfw_group', 'inputGroup', 'view', 'html'));
if ($data['Pesan']) {
$this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
$this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $data['Pesan']);
$this->mrTemplate->AddVar('warning_box', 'CLASS_PESAN', $data['css']);
}
if (empty($data['dataGroup'])) {
$this->mrTemplate->AddVar('data_group', 'GROUP_EMPTY', 'YES');
} else {
$this->mrTemplate->AddVar('data_group', 'GROUP_EMPTY', 'NO');
$dataGroup = $data['dataGroup'];
$len = sizeof($dataGroup);
$menuName = '';
$idGroup = '';
$no = 0;
for ($i = 0; $i < $len; $i++) {
if ($idGroup != $dataGroup[$i]['group_id']) {
$no++;
$menuBaru[$no]['no'] = $no;
$menuBaru[$no]['group_id'] = $dataGroup[$i]['group_id'];
$menuBaru[$no]['group_name'] = $dataGroup[$i]['group_name'];
$menuBaru[$no]['group_description'] = $dataGroup[$i]['group_description'];
$menuBaru[$no]['unit_kerja'] = $dataGroup[$i]['unit_kerja'];
$menuBaru[$no]['hak_akses'] = '';
$idGroup = $dataGroup[$i]['group_id'];
$menuName = '';
}
if ($dataGroup[$i]['menu_name'] != $menuName) {
$menuBaru[$no]['hak_akses'] .= '<strong>' . $dataGroup[$i]['menu_name'] . '</strong><br>' . ' - ' . $dataGroup[$i]['sub_menu'] . '<br>';
$menuName = $dataGroup[$i]['menu_name'];
} else {
$menuBaru[$no]['hak_akses'] .= ' - ' . $dataGroup[$i]['sub_menu'] . '<br>';
}
}
$no = 1;
for ($i = 1; $i < count($menuBaru) + 1; $i++) {
$menuBaru[$i]['number'] = $no;
if ($no % 2 != 0) {
$dataGroup[$i]['class_name'] = 'table-common-even';
} else {
$dataGroup[$i]['class_name'] = '';
}
$no++;
$idEnc = Dispatcher::Instance()->Encrypt($menuBaru[$i]['group_id']);
$menuBaru[$i]['url_edit'] = Dispatcher::Instance()->GetUrl('gtfw_group', 'inputGroup', 'view', 'html') . '&grp=' . $idEnc;
$idEnc = Dispatcher::Instance()->Encrypt($menuBaru[$i]['group_id']);
$urlAccept = 'gtfw_group|deleteGroup|do|html-cari-';
$urlReturn = 'gtfw_group|group|view|html-cari-';
$label = 'Group';
$dataName = $menuBaru[$i]['group_name'];
$menuBaru[$i]['url_delete'] = Dispatcher::Instance()->GetUrl('confirm', 'confirmDelete', 'do', 'html') . '&urlDelete=' . $urlAccept . '&urlReturn=' . $urlReturn . '&id=' . $idEnc . '&label=' . $label . '&dataName=' . $dataName;
$this->mrTemplate->AddVars('data_group_item', $menuBaru[$i], 'GROUP_');
$this->mrTemplate->parseTemplate('data_group_item', 'a');
}
}
}
示例10: __construct
function __construct($connectionNumber = 0)
{
$db_type = Configuration::Instance()->GetValue('application', 'db_conn', 0, 'db_type');
$this->mSqlFile = 'module/' . Dispatcher::Instance()->mModule . '/business/' . $db_type . '/anggota.sql.php';
$this->_POST = is_object($_POST) ? $_POST->AsArray() : $_POST;
$this->_GET = is_object($_GET) ? $_GET->AsArray() : $_GET;
parent::__construct($connectionNumber);
}
示例11: ProcessRequest
function ProcessRequest()
{
$links = array(array('label' => 'XlsResponse', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'excel', 'view', 'xls')), array('label' => 'XlsxResponse', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'excelNew', 'view', 'xlsx')), array('label' => 'PdfxResponse Sample 1', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 2', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx2', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 3', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx3', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 4', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx4', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 5', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx5', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 33', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx33', 'view', 'pdfx')), array('label' => 'PdfxResponse Sample 65', 'ajax' => false, 'url' => Dispatcher::Instance()->GetUrl('test', 'pdfx65', 'view', 'pdfx')));
// $key = Dispatcher::Instance()->mStartKey;
// $ori = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~!@#$%^&*()-_=+`,<.>/?'\";:[{]}\|";
// $enc = Dispatcher::Instance()->Encrypt($ori);
// $dec = Dispatcher::Instance()->Decrypt($enc);
// echo '<pre>'; print_r(compact('key', 'ori', 'enc', 'dec')); echo '</pre>';
return compact('links');
}
示例12: ProcessRequest
function ProcessRequest()
{
//var_dump($_SESSION['logged_in']);
//die('ViewAnchor');
if ($_SESSION['logged_in']) {
return array('Logout', Dispatcher::Instance()->GetUrl('login_default', 'logout', 'do', 'html'), 'image/header-upload.png');
} else {
return array('Login', Dispatcher::Instance()->GetUrl('login_default', 'login', 'view', 'html'), 'image/header-download.png');
}
}
示例13: GetDefaultEndpoint
function GetDefaultEndpoint()
{
$tmpEndPoint = Configuration::Instance()->GetValue('application', 'app_service_endpoint');
if (isset($tmpEndPoint)) {
$endpoint = Configuration::Instance()->GetValue('application', 'app_service_endpoint');
} else {
$endpoint = Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl('soap_gateway', 'Gateway', 'Soap', 'soap') . "&wsdl";
}
return $endpoint;
}
示例14: ProcessRequest
function ProcessRequest()
{
Security::Instance()->Logout(TRUE);
//$this->RedirectTo($this->mrDispatcher->GetUrl('login_default', 'session', 'destroy', 'html'));
$module = Configuration::Instance()->GetValue('application', 'default_module');
$submodule = Configuration::Instance()->GetValue('application', 'default_submodule');
$action = Configuration::Instance()->GetValue('application', 'default_action');
$type = Configuration::Instance()->GetValue('application', 'default_type');
$this->RedirectTo(Dispatcher::Instance()->GetUrl($module, $submodule, $action, $type));
}
示例15: ParseTemplate
function ParseTemplate($data = NULL)
{
$this->mrTemplate->AddVar('content', 'USER_ID', $data['usr']);
if ($data['Pesan']) {
$this->mrTemplate->SetAttribute('warning_box', 'visibility', 'visible');
$this->mrTemplate->AddVar('warning_box', 'ISI_PESAN', $data['Pesan']);
$this->mrTemplate->AddVar('content', 'USER_ID', $data['Data'][0]['usr']);
}
$this->mrTemplate->AddVar('content', 'URL_ACTION', Dispatcher::Instance()->GetUrl('gtfw_user', 'updatePassword', 'do', 'html'));
$this->mrTemplate->addVar('content', 'URL_CANCEL', Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, 'user', 'view', 'html'));
}