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


PHP Komento::getClass方法代码示例

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


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

示例1: getAjaxTemplate

 public function getAjaxTemplate()
 {
     $files = JRequest::getVar('names', '');
     if (empty($files)) {
         return false;
     }
     // Ensure the integrity of each items submitted to be an array.
     if (!is_array($files)) {
         $files = array($files);
     }
     $result = array();
     foreach ($files as $file) {
         $template = Komento::getTheme();
         $out = $template->fetch($file . '.ejs');
         $obj = new stdClass();
         $obj->name = $file;
         $obj->content = $out;
         $result[] = $obj;
     }
     Komento::getClass('json', 'KomentoJson');
     header('Content-type: text/x-json; UTF-8');
     $json = new KomentoJson();
     echo $json->encode($result);
     exit;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:25,代码来源:themes.php

示例2: getResource

 public function getResource()
 {
     $resources = JRequest::getVar('resource');
     $component = JRequest::getCmd('kmtcomponent');
     Komento::setCurrentComponent($component);
     if (!is_array($resources)) {
         header('Content-type: text/x-json; UTF-8');
         echo '[]';
         exit;
     }
     foreach ($resources as &$resource) {
         $resource = (object) $resource;
         switch ($resource->type) {
             case 'language':
                 $resource->content = JText::_(strtoupper($resource->name));
                 break;
             case 'view':
                 $template = Komento::getTheme();
                 $out = $template->fetch($resource->name . '.ejs');
                 if ($out !== false) {
                     $resource->content = $out;
                 }
                 break;
         }
     }
     Komento::getClass('json', 'KomentoJson');
     header('Content-type: text/x-json; UTF-8');
     $json = new KomentoJson();
     echo $json->encode($resources);
     exit;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:foundry.php

示例3: getLanguage

 public function getLanguage()
 {
     $languages = JRequest::getVar('languages');
     $result = array();
     // If this is not an array, make it as an array.
     if (!is_array($languages)) {
         $languages = array($languages);
     }
     foreach ($languages as $key) {
         $result[$key] = JText::_(strtoupper($key));
     }
     Komento::getClass('json', 'Services_JSON');
     header('Content-type: text/x-json; UTF-8');
     $json = new Services_JSON();
     echo $json->encode($result);
     exit;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:17,代码来源:lang.php

示例4: _

 public static function _()
 {
     $class = 'KomentoLegacy16';
     if (Komento::joomlaVersion() == '1.5') {
         $class = 'KomentoLegacy15';
     }
     $legacy = Komento::getClass('legacy', $class);
     $args = func_get_args();
     $function = array_shift($args);
     if (strstr($function, '::')) {
         $function = str_replace('::', '_', $function);
     }
     if (is_callable(array($class, $function))) {
         return call_user_func_array(array($class, $function), $args);
     } else {
         return false;
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:18,代码来源:helper.php

示例5: header

if (Komento::joomlaVersion() >= '1.6') {
    if (!JFactory::getUser()->authorise('core.manage', 'com_komento')) {
        JFactory::getApplication()->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
        JFactory::getApplication()->close();
    }
}
// else
// {
// 	if ( !JFactory::getUser()->authorize('com_komento', 'manage') )
// 	{
// 		return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
// 	}
// }
if (JRequest::getBool('compile')) {
    $minify = JRequest::getBool('minify', false);
    $compiler = Komento::getClass('compiler', 'KomentoCompiler');
    $results = $compiler->compile($minify);
    header('Content-type: text/x-json; UTF-8');
    echo json_encode($results);
    exit;
}
Komento::getHelper('Ajax')->process();
// Get the task
$task = JRequest::getCmd('task', 'display');
// We treat the view as the controller. Load other controller if there is any.
$controller = JRequest::getCmd('c', JRequest::getCmd('controller', ''));
// If task is getLanguage, then set c = lang
if ($task == 'getLanguage') {
    $controller = 'lang';
}
$controller = KomentoController::getInstance($controller);
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:komento.php


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