本文整理汇总了PHP中Manager::getAppURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getAppURL方法的具体用法?PHP Manager::getAppURL怎么用?PHP Manager::getAppURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::getAppURL方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formTemplatedFEs
public function formTemplatedFEs()
{
$model = new Template();
$this->data->title = '';
//Template: ' . $model->getEntry() . ' [' . $model->getName() . ']';
$this->data->query = Manager::getAppURL('fnbr20', 'structure/template/gridDataTemplatedFEs/' . $this->data->id);
$this->render();
}
示例2: formManager
public function formManager()
{
$this->data->query = Manager::getAppURL('fnbr20', 'annotation/layer/gridData');
$this->data->action = "@fnbr20/annotation/layer/save|formManager";
$fnbr20Layers = Manager::getSession()->fnbr20Layers;
$this->data->layersToShow = \Maestro\Services\MJSON::encode($fnbr20Layers ?: []);
$this->render();
}
示例3: buildURL
public function buildURL($action = '', $parameters = array())
{
//mtrace('buildURL = ' . $action);
//mtrace($parameters);
$app = Manager::getApp();
$module = Manager::getModule();
if ($action[0] == '@') {
$url = Manager::getAppURL($app);
$action = substr($action, 1);
} elseif ($action[0] == '>') {
$url = Manager::getAppURL($app);
$action = substr($action, 1);
} elseif ($action[0] == '#') {
$url = Manager::getStaticURL();
$action = substr($action, 1);
} else {
$url = Manager::getAppURL($app);
}
//mtrace('url = '. $url);
$path = '';
//mtrace("============== buildURL ============");
//mtrace('*action = ' . $action);
if ($p = strpos($action, '/')) {
$index = substr($action, 0, $p);
$action = substr($action, $p + 1);
} else {
$index = $module != '' ? $module : $app;
}
// mtrace('index = ' . $index);
// mtrace('action = ' . $action);
//$action = str_replace('.','/', $action);
$path = '/' . $action;
// mtrace('*index = ' . $index);
// mtrace('app = ' . $app);
if ($index != $app) {
$path = '/' . $index . $path;
}
//mtrace('*path = ' . $path);
if (count($parameters)) {
$query = http_build_query($parameters);
$path .= (strpos($path, '?') === false ? '?' : '') . $query;
}
$url .= $path;
//mtrace('url = ' . $url);
//mtrace("============ end getURL ============");
return $url;
}
示例4: main
public function main()
{
$this->data->query = Manager::getAppURL('fnbr20', 'admin/relationgroup/gridData');
$this->render();
}
示例5: formNewLU
public function formNewLU()
{
$this->data->idFrame = $this->data->id;
$model = new Frame($this->data->idFrame);
$this->data->frame = 'Frame: ' . $model->getEntry() . ' [' . $model->getName() . ']';
$model = new Lemma();
$this->data->query = Manager::getAppURL('fnbr20', 'structure/frame/gridSearchLemmaData');
$this->data->save = "@fnbr20/structure/frame/newLU|formNewLU";
$this->data->close = "!\$('#formNewLU_dialog').dialog('close');structure.reloadFrame()";
$this->data->title = _M('New LU');
$this->render();
}
示例6: __construct
public function __construct($msg = null, $code = 0)
{
parent::__construct(_M($msg), $code, Manager::getAppURL('', 'main'));
$this->log();
}
示例7: formExportFrames
public function formExportFrames()
{
$this->data->query = Manager::getAppURL('fnbr20', 'utils/export/gridDataFrames');
$this->data->action = '@fnbr20/utils/export/exportFrames';
$this->render();
}
示例8: generate
public function generate()
{
$this->errors = array();
$this->ini = parse_ini_file($this->fileScript, true);
$tab = ' ';
$dbName = $this->ini['globals']['database'];
$appName = $this->ini['globals']['app'];
$moduleName = $this->ini['globals']['module'] ?: $appName;
$actions[] = $tab . "'{$moduleName}' => array('{$moduleName}', '{$moduleName}/main/main', '{$moduleName}IconForm', '', A_ACCESS, array(";
foreach ($this->ini as $className => $node) {
$originalClassName = $className;
$className = strtolower($className);
if ($className == 'globals') {
continue;
}
$properties = $methods = $validators = '';
mdump('handleClass = ' . $className);
$extends = $node['extends'];
$log = $node['log'];
if ($node['type'] == 'enumeration') {
$consts = $modelName = $tableName = $properties = '';
$attributes = $node['attributes'];
foreach ($attributes as $attributeName => $attributeData) {
if ($attributeName == 'model') {
$modelName = $attributeData;
}
if ($attributeName == 'table') {
$tableName = $attributeData;
}
if ($attributeName == 'model' || $attributeName == 'table') {
$attributeData = "\"{$attributeData}\"";
}
$properties .= "\n protected static \$" . $attributeName . " = " . $attributeData . ";";
}
if ($tableName) {
$sessionId = Manager::getSession()->getId();
$url = Manager::getAppURL($appName, $moduleName . '/tabelageral/getenumeration/' . $tableName . "?ajaxResponseType=JSON", true);
//mdump($url);
if ($stream = fopen($url, 'r')) {
$result = MJSON::decode(stream_get_contents($stream));
$constants = $result['data']['result']['items'];
//mdump($constants);
foreach ($constants as $value) {
$consts .= "\n const " . str_replace(' ', '_', $value['name']) . " = " . $value['idTable'] . ";";
}
fclose($stream);
}
} else {
$constants = $node['constants'];
foreach ($constants as $constantName => $constantData) {
$consts .= "\n const " . $constantName . " = " . $constantData . ";";
}
}
$var = array();
$var['class'] = $originalClassName;
$var['model'] = $originalClassName;
$var['module'] = $moduleName ?: $appName;
$var['moduleName'] = $moduleName;
$var['default'] = $node['default'] ?: 'DEFAULT';
$var['constants'] = $consts;
$var['properties'] = $properties;
$var['comment'] = $comment;
$var['package'] = $appName;
$var['extends'] = $extends ?: '\\MEnumBase';
$var['description'] = $description;
$this->generateEnumeration($className, $var);
continue;
}
$document = $ormmap = $docassoc = $docattr = $attributes = array();
$document[] = '';
$document[] = $tab . 'public static function ORMMap() {';
$document[] = '';
$ormmap[] = $tab . $tab . 'return array(';
$ormmap[] = $tab . $tab . $tab . "'class' => \\get_called_class(),";
$ormmap[] = $tab . $tab . $tab . "'database' => " . (substr($dbName, 0, 1) == "\\" ? $dbName . ',' : "'{$dbName}',");
$tableName = $node['table'];
$ormmap[] = $tab . $tab . $tab . "'table' => '{$tableName}',";
if ($extends) {
$ormmap[] = $tab . $tab . $tab . "'extends' => '{$extends}',";
}
$pk = '';
$getterSetter = "\n\n /**\n * Getters/Setters\n */";
$attributes = $node['attributes'];
foreach ($attributes as $attributeName => $attributeData) {
$isPK = false;
$at = explode(',', $attributeData);
// atData:
// 0 - column
// 1 - type
// 2 - null or not null
// 3 - key type
// 4 - generator
$attribute = $tab . $tab . $tab . "'{$attributeName}' => array(";
$attribute .= "'column' => '{$at[0]}'";
if ($at[3]) {
$attribute .= ",'key' => '{$at[3]}'";
$isPK = $at[3] == 'primary';
if ($isPK) {
$pk = $attributeName;
if ($at[4]) {
//.........这里部分代码省略.........
示例9: formSOAPClient
public function formSOAPClient()
{
ini_set("soap.wsdl_cache_enabled", "0");
// Acessando o webservice definido no método SOAPServer (acima)
$client = new Client();
$client->setSoapVersion(SOAP_1_2);
try {
$uri = Manager::getAppURL('exemplos', 'zend/soapServer?wsdl', true);
$client->setWSDL($uri);
$this->data->response1 = $client->method1("Teste");
$this->data->response2 = $client->method2(10, 'Framework Maestro + Zend');
} catch (Exception $e) {
mdump($e->getMessage());
mdump($e->getTraceAsString());
}
// Acessando um webservice externo como exemplo
$clientCountry = new Client();
$clientCountry->setWSDL('http://www.webservicex.net/country.asmx?WSDL');
$countries = simplexml_load_string($clientCountry->GetCountries()->GetCountriesResult);
$this->data->country->name = $countries->Table[29]->Name;
$Country->CountryCode = "BR";
$code = simplexml_load_string($clientCountry->GetCountryByCountryCode($Country)->GetCountryByCountryCodeResult);
$this->data->country->code = 'Code: ' . $code->Table[0]->countrycode;
$this->data->country->country = 'Country: ' . $code->Table[0]->name;
$this->render();
}