当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::getAppPath方法代码示例

本文整理汇总了PHP中Manager::getAppPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getAppPath方法的具体用法?PHP Manager::getAppPath怎么用?PHP Manager::getAppPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager::getAppPath方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     parent::init();
     $this->idLanguage = Manager::getConf('options.language');
     $msgDir = Manager::getAppPath('conf/report');
     Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
     Manager::$msg->addMessages($msgDir);
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:8,代码来源:MessageController.php

示例2: init

 public function init()
 {
     Manager::checkLogin(false);
     $this->idLanguage = Manager::getConf('fnbr20.lang');
     $msgDir = Manager::getAppPath('conf/report');
     Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
     Manager::$msg->addMessages($msgDir);
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:8,代码来源:_FrameController.php

示例3: generateInner

 public function generateInner()
 {
     $css = Manager::getAbsolutePath('core/classes/extensions/geshi/geshi.css');
     Manager::getPage()->addStyleSheet($css);
     $cssCustom = Manager::getAppPath('public/css/geshiCustom.css');
     if (file_exists($cssCustom)) {
         Manager::getPage()->addStyleSheet($cssCustom);
     }
     $source = $this->getText();
     $language = $this->getLanguage();
     $geshi = new GeSHi($source, $language);
     $this->setText($geshi->parse_code());
     $this->inner = $this->render();
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:14,代码来源:msyntax.php

示例4: createScript

 public function createScript()
 {
     $fileName = $this->data->script;
     $fileScript = Manager::getAppPath('public/files/scripts/') . $fileName;
     if (!file_exists($fileScript)) {
         $fileScript .= ".txt";
         if (!file_exists($fileScript)) {
             throw new Exception("Arquivo Script inexistente");
         }
     }
     $script = new MWizardScript();
     $baseDir = Manager::getOptions('basePath');
     $script->setBaseDir($baseDir);
     $script->setFile($fileScript);
     $script->generate();
     if (count($script->errors)) {
         $this->renderPrompt('error', $script->errors);
     } else {
         $this->renderPrompt('information', 'Arquivos gerados com sucesso em ' . $baseDir);
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:21,代码来源:mainController.php

示例5: show

 public function show()
 {
     $file = Manager::getAppPath('public/files/controles.txt');
     $this->data->ini = parse_ini_file($file, true);
     $this->data->class = $this->data->lookupControl;
     $this->data->description = $this->data->ini[$this->data->class]['description'];
     $this->data->extends = $this->data->ini[$this->data->class]['extends'];
     $this->data->attributes = array();
     $attributes = $this->data->ini[$this->data->class]['attributes'];
     if (is_array($attributes)) {
         foreach ($attributes as $name => $description) {
             $this->data->attributes[$name]['name'] = $name;
             $this->data->attributes[$name]['class'] = $this->data->class;
             $this->data->attributes[$name]['description'] = $description;
         }
     }
     $header = $this->data->ini[$this->data->class];
     $extends = $header['extends'];
     while ($extends) {
         $parent = $this->data->ini[$extends];
         $attributes = $parent['attributes'];
         if (is_array($attributes)) {
             foreach ($attributes as $name => $description) {
                 $this->data->attributes[$name]['name'] = $name;
                 $this->data->attributes[$name]['class'] = $extends;
                 $this->data->attributes[$name]['description'] = $description;
             }
         }
         $extends = $parent['extends'];
     }
     ksort($this->data->attributes);
     $codeXML = Manager::getAppPath('public/files/code/' . strtolower($this->data->class) . '.xml');
     $this->data->code = highlight_file($codeXML, true);
     //htmlentities(file_get_contents($codeXML));
     mdump($codeXML);
     mdump($this->data->code);
     $this->render();
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:38,代码来源:mainController.php

示例6: file

 public function file($type, $fileName)
 {
     if ($type == 'file') {
         $file = $this->path . '/' . $fileName;
     } elseif ($type == 'component') {
         $file = Manager::getAppPath('components/' . $fileName);
     }
     return $file;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:9,代码来源:mtemplate.php

示例7: getClassMap

 public function getClassMap($className, $module = '', $class = '')
 {
     $className = str_replace('\\', '', $className);
     if (isset($this->classMaps[$className])) {
         return $this->classMaps[$className];
     }
     if ($module == '') {
         $module = $this->location[$className]['module'];
         $class = $this->location[$className]['class'];
     } else {
         $this->location[$className]['module'] = $module;
         $this->location[$className]['class'] = $class;
     }
     $xml = $this->getMap($module, $class, $className);
     $database = (string) $xml->databaseName;
     $classMap = new ClassMap($className, $database);
     $classMap->setDatabaseName($database);
     $classMap->setTableName((string) $xml->tableName);
     if (isset($xml->extends)) {
         $classMap->setSuperClassName((string) $xml->extends);
     }
     //$config = $className::config();
     $attributes = $this->getAsArray($xml->attribute);
     foreach ($attributes as $attr) {
         $attributeMap = new AttributeMap((string) $attr->attributeName, $classMap);
         //     $converter = $this->getConverter($attr);
         if (isset($attr->attributeIndex)) {
             $attributeMap->setIndex($attr->attributeIndex);
         }
         $type = isset($attr->columnType) ? strtolower($attr->columnType) : 'string';
         if (($converterName = strtolower($attr->converter->converterName)) != '') {
             if ($converterName == 'timestampconverter') {
                 $type = 'timestamp';
             }
         }
         $attributeMap->setType($type);
         $plataformTypedAttributes = $classMap->getDb()->getPlatform()->getTypedAttributes();
         $attributeMap->setHandled(strpos($plataformTypedAttributes, $type));
         $attributeMap->setColumnName($attr->columnName ?: $attributeName);
         $attributeMap->setAlias($attr->aliasName ?: $attributeName);
         $attributeMap->setKeyType($attr->key ?: 'none');
         $attributeMap->setIdGenerator($attr->idgenerator);
         if (isset($attr->reference) && $classMap->getSuperClassMap() != NULL) {
             $referenceAttribute = $classMap->getSuperClassMap()->getAttributeMap($attributeName);
             if ($referenceAttribute) {
                 $attributeMap->setReference($referenceAttribute);
             }
         }
         $classMap->addAttributeMap($attributeMap);
     }
     $this->classMaps[$className] = $classMap;
     if (isset($xml->association)) {
         $associations = $this->getAsArray($xml->association);
         $fromClassMap = $classMap;
         foreach ($associations as $association) {
             $associationName = (string) $association->target;
             $toClass = 'business' . $association->toClassModule . $association->toClassName;
             $this->location[$toClass]['module'] = $association->toClassModule;
             $this->location[$toClass]['class'] = $association->toClassName;
             $classPath = Manager::getAppPath("modules/" . $association->toClassModule . '/models/' . $association->toClassName . '.class.php');
             Manager::addAutoloadClass($toClass, $classPath);
             $associationMap = new AssociationMap($classMap, $associationName);
             $associationMap->setToClassName($toClass);
             $associationMap->setDeleteAutomatic($association->deleteAutomatic);
             $associationMap->setSaveAutomatic($association->saveAutomatic);
             $associationMap->setRetrieveAutomatic($association->retrieveAutomatic);
             //$associationMap->setJoinAutomatic($association['joinAutomatic']);
             $autoAssociation = strtolower($className) == strtolower($toClass);
             if (!$autoAssociation) {
                 $autoAssociation = strtolower($className) == strtolower(substr($toClass, 1));
             }
             $associationMap->setAutoAssociation($autoAssociation);
             if (isset($association->indexAttribute)) {
                 $associationMap->setIndexAttribute($association->indexAttribute->indexAttributeName);
             }
             $associationMap->setCardinality($association->cardinality);
             if ($association->cardinality == 'manyToMany') {
                 $associativeClassName = 'business' . $association->associativeClassModule . $association->associativeClassName;
                 $associativeXML = $this->getMap($association->associativeClassModule, $association->associativeClassName, $associativeClassName);
                 $associationMap->setAssociativeTable((string) $associativeXML->tableName);
             } else {
                 $entries = $this->getAsArray($association->entry);
                 $inverse = $association->inverse == 'true';
                 foreach ($entries as $entry) {
                     $fromAttribute = $inverse ? $entry->toAttribute : $entry->fromAttribute;
                     $toAttribute = $inverse ? $entry->fromAttribute : $entry->toAttribute;
                     $associationMap->addKeys($fromAttribute, $toAttribute);
                 }
             }
             if (isset($association->orderAttribute)) {
                 $order = array();
                 $orderAttributes = $this->getAsArray($association->orderAttribute);
                 foreach ($orderAttributes as $orderAttr) {
                     $ascend = $orderAttr->orderAttributeDirection == 'ascend';
                     $order[] = array($orderAttr->orderAttributeName, $ascend);
                 }
                 if (count($order)) {
                     $associationMap->setOrder($order);
                 }
             }
//.........这里部分代码省略.........
开发者ID:elymatos,项目名称:expressive,代码行数:101,代码来源:XMLConfigLoader.php

示例8: invokeHandler

 public function invokeHandler($m, $handler)
 {
     global $context, $module, $action, $item, $session, $page, $auth, $perms, $navbar, $theme, $history, $self, $url;
     if ($handler == '') {
         return false;
     }
     //$this->data = $data;
     $this->action = $handler;
     $app = Manager::getApp();
     if ($m == '' || $m == $app) {
         $module = $app;
         $path = Manager::getAppPath() . '/controllers/';
     } else {
         $module = $m;
         $path = Manager::getModulePath($module, 'controllers/');
     }
     //mdump("Handler:invokeHandler: [$module][$handler]");
     $context = Manager::getContext();
     $action = $context->getAction();
     $self = $context->getAction();
     $item = mrequest('item');
     $session = Manager::getSession();
     $navbar = new MNavigationBar();
     //$view = Manager::getView($module, 'handler', $action);
     $page = $this->theme;
     $url = Manager::getCurrentURL();
     $auth = Manager::getAuth();
     $perms = Manager::getPerms();
     $theme = $this->theme;
     $file = $path . $handler . '.inc.php';
     //mdump('Handler:invokeHandler: file : ' . $file);
     if ($return = file_exists($file)) {
         include $file;
     }
     return $return;
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:36,代码来源:mhandler.php

示例9: array

<?php

return array('basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', 'name' => 'Exemplos', 'instituicao' => 'Framework Maestro', 'import' => array('models.*'), 'theme' => array('name' => 'default', 'template' => 'index'), 'ui' => array('inlineFormAction' => true), 'login' => array('module' => "", 'class' => "MAuthDbMd5", 'check' => false), 'filters' => array('session', 'profile'), 'db' => array('exemplos' => array('driver' => 'sqlite3', 'path' => Manager::getAppPath('models/sql/exemplos.db'), 'formatDate' => '%d/%m/%Y', 'formatTime' => '%H:%M:%S', 'configurationClass' => 'Doctrine\\DBAL\\Configuration')));
开发者ID:joshuacoddingyou,项目名称:php,代码行数:3,代码来源:conf.php

示例10: getControlsFromInclude

 private function getControlsFromInclude($node, &$controls, $handleChildren = false)
 {
     if ($node) {
         $attributes = $node->attributes();
         if ($attributes['file']) {
             $fileName = $attributes['file'];
             $file = $this->path . '/' . $this->processValue($fileName);
         } elseif ($attributes['component']) {
             $fileName = $attributes['component'];
             $file = Manager::getAppPath('components/' . $fileName);
         }
         $extension = pathinfo($file, PATHINFO_EXTENSION);
         if ($extension == 'xml') {
             $xmlControls = new MXMLControls();
             $xmlControls->loadFile($file, $this->context);
             if ($handleChildren) {
                 $this->handleChildren($controls, $xmlControls->root);
             } else {
                 foreach ($xmlControls->get() as $c) {
                     $this->getControlFromDOM($c, $node);
                     $controls[] = $c;
                 }
             }
         } elseif ($extension == 'php') {
             include_once $file;
             $fileName = end(explode('/', $fileName)) ?: $fileName;
             $className = str_replace('.' . $extension, '', $fileName);
             $c = new $className();
             $this->getControlFromDOM($c, $node);
             if ($handleChildren) {
                 $controls->addControl($c);
             } else {
                 $controls[] = $c;
             }
         }
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:37,代码来源:mxmlcontrols.php

示例11: addApplicationActions

 public function addApplicationActions()
 {
     $actionsFile = Manager::getAppPath('conf/actions.php');
     Manager::loadActions($actionsFile);
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:5,代码来源:mfrontcontroller.php

示例12: getContent

 private function getContent($controller, $view, $parameters = NULL)
 {
     $path = '/views/' . $controller . '/' . $view;
     if (is_dir(Manager::getAppPath($path, $this->module))) {
         $path .= '/' . $view;
     }
     if (file_exists($file = Manager::getAppPath($path . '.php', $this->module, $this->application))) {
         // try php view
         mtrace('MController::getContent from ' . $file);
         $this->renderView($controller, $file, $parameters);
     } elseif (file_exists($file = Manager::getAppPath($path . '.xml', $this->module, $this->application))) {
         // php view not found, try xml view
         mtrace('MController::getContent from ' . $file);
         $this->renderView($controller, $file, $parameters);
     } elseif (file_exists($file = Manager::getAppPath($path . '.js', $this->module, $this->application))) {
         // xml view not found, try js view
         mtrace('MController::getContent from ' . $file);
         $this->renderView($controller, $file, $parameters);
     } elseif (file_exists($file = Manager::getAppPath($path . '.html', $this->module, $this->application))) {
         // js view not found, try html view
         mtrace('MController::getContent from ' . $file);
         $this->renderView($controller, $file, $parameters);
     } elseif (file_exists($file = Manager::getAppPath($path . '.wiki', $this->module, $this->application))) {
         // html view not found, try wiki view
         mtrace('MController::getContent from ' . $file);
         $this->renderView($controller, $file, $parameters);
     }
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:28,代码来源:mcontroller.php

示例13: setFieldsFromXML

 public function setFieldsFromXML($file = 'fields.xml', $fileXML = '', $data = NULL, $folder = '')
 {
     if (count(func_get_args()) > 1) {
         // compatibilidade
         $path = Manager::getAppPath('', $file . '/views/' . ($folder ? $folder . '/' : '') . $fileXML . '.xml');
         $this->data->_xmlParams = $data;
     } else {
         $path = pathinfo($this->view->viewFile, PATHINFO_DIRNAME) . '/' . $file;
     }
     $this->clearFields();
     $this->addControlsFromXML($path);
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:12,代码来源:mbaseform.php

示例14: saveResult

 public function saveResult($fileName, $baseDir = '')
 {
     if ($baseDir != '') {
         $file = $baseDir;
         //Manager::getAppPath($baseDir);
         $dirs = explode('/', $fileName);
         $n = count($dirs);
         if ($n > 0) {
             $path = $file;
             for ($i = 0; $i < $n - 1; $i++) {
                 $path .= '/' . $dirs[$i];
                 if (!is_dir($path)) {
                     mkdir($path);
                     chmod($path, octdec(777));
                 }
             }
         }
         $file .= '/' . $fileName;
     } else {
         $file = Manager::getAppPath($fileName);
         $path = pathinfo($file, PATHINFO_DIRNAME);
         if (!is_dir($path)) {
             mkdir($path);
             chmod($path, octdec(777));
         }
     }
     file_put_contents($file, $this->resultFile);
     chmod($file, octdec(777));
 }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:29,代码来源:MWizardTemplate.php


注:本文中的Manager::getAppPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。