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


PHP JController::getInstance方法代码示例

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


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

示例1: joooid_getController

function joooid_getController()
{
    if (version_compare(JVERSION, '3.0', '<')) {
        return JController::getInstance('joooid');
    }
    return JControllerLegacy::getInstance('joooid');
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:joooid.php

示例2: getController

 public static function getController()
 {
     if (version_compare(JVERSION, '3.0', 'ge')) {
         return JControllerLegacy::getInstance('Bt_Socialconnect');
     } else {
         return JController::getInstance('Bt_Socialconnect');
     }
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:8,代码来源:legacy.php

示例3: render

	/**
	 * Render the application
	 *
	 * @return	void
	 */
	public function render()
	{
		$document = JFactory::getDocument();
		$config = JFactory::getConfig();
		$user = JFactory::getUser();

		switch($document->getType())
		{
			case 'html' :
				// Set metadata
				$document->setTitle(JText::_('INSTL_PAGE_TITLE'));
				break;
			default :
				break;
		}

		// Define component path
		define('JPATH_COMPONENT', JPATH_BASE);
		define('JPATH_COMPONENT_SITE', JPATH_SITE);
		define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR);

		// Start the output buffer.
		ob_start();

		// Import the controller.
		require_once JPATH_COMPONENT.'/controller.php';

		// Execute the task.
		$controller	= JController::getInstance('JInstallation');
		$controller->execute(JRequest::getVar('task'));
		$controller->redirect();

		// Get output from the buffer and clean it.
		$contents = ob_get_contents();
		ob_end_clean();

		$file = JRequest::getCmd('tmpl', 'index');

		$params = array(
			'template'	=> 'template',
			'file'		=> $file.'.php',
			'directory' => JPATH_THEMES,
			'params'	=> '{}'
		);

		$document->setBuffer($contents, 'installation');
		$document->setTitle(JText::_('INSTL_PAGE_TITLE'));

		$data = $document->render(false, $params);
		JResponse::setBody($data);
		if (JFactory::getConfig()->get('debug_lang')) {
			$this->debugLanguage();
		}
	}
开发者ID:realityking,项目名称:JAJAX,代码行数:59,代码来源:application.php

示例4: updateCertificatesTable

    public function updateCertificatesTable($passed) {

        $testid = JRequest::getVar('testid');
        $user =& JFactory::getUser();

        require_once( JPATH_SITE.DS. DS . 'components' . DS . 'com_flexpaper' . DS . 'controller.php');
        $flexpaper_controller = JController::getInstance('flexpaper');

        $flexpaper_controller->CreateCertificate($testid,$user->id, $passed);

    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:11,代码来源:questions.php

示例5: explode

 * required controller class
 */
if (strpos(JRequest::getCmd('task'), '.') !== false) {
    $controller = explode('.', JRequest::getCmd('task'));
    $controller = array_shift($controller);
    $classname = 'FabrikController' . JString::ucfirst($controller);
    $path = JPATH_COMPONENT . '/controllers/' . $controller . '.php';
    if (JFile::exists($path)) {
        require_once $path;
        // Needed to process J content plugin (form)
        JRequest::setVar('view', $controller);
        $task = explode('.', JRequest::getCmd('task'));
        $task = array_pop($task);
        $controller = new $classname();
    } else {
        $controller = JController::getInstance('Fabrik');
    }
} else {
    $classname = 'FabrikController' . JString::ucfirst($controller);
    $controller = new $classname();
    $task = JRequest::getCmd('task');
}
if ($isplugin) {
    // Add in plugin view
    $controller->addViewPath(JPATH_SITE . '/plugins/fabrik_' . $type . '/' . $name . '/views');
    // Add the model path
    $modelpaths = JModel::addIncludePath(JPATH_SITE . '/plugins/fabrik_' . $type . '/' . $name . '/models');
}
$app = JFactory::getApplication();
$package = JRequest::getVar('package', 'fabrik');
$app->setUserState('com_fabrik.package', $package);
开发者ID:rogeriocc,项目名称:fabrik,代码行数:31,代码来源:fabrik.php

示例6: defined

<?php

/**
 * @version		$Id$
 * @copyright   	Copyright (C) 2007 - 2009 Joomla! Vargas. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @author		Guillermo Vargas (guille@vargas.co.cr)
 */
// no direct access
defined('_JEXEC') or die;
JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables');
jimport('joomla.form.form');
JForm::addFieldPath(JPATH_COMPONENT . DS . 'models' . DS . 'fields');
//JForm::addFieldPath( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_menus'.DS.'models'.DS.'fields' );
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Xmap');
$controller->execute(JRequest::getVar('task'));
$controller->redirect();
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:19,代码来源:xmap.php

示例7: defined

<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
//JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_mailup' . DS . 'tables');
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_mailup')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// require helper file
JLoader::register('MailUPHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'mailup.php');
// import joomla controller library
jimport('joomla.application.component.controller');
// Get an instance of the controller prefixed by MailUP
$controller = JController::getInstance('MailUP');
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
开发者ID:alesconti,项目名称:FF_2015,代码行数:20,代码来源:mailup.php

示例8: defined

<?php

/**
 * @version		$Id$
 * @package		Joomla.Administrator
 * @subpackage	com_search
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_search')) {
    return JError::raiseWarning(404, JText::_('ALERTNOTAUTH'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Search');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:joebushi,项目名称:joomla,代码行数:20,代码来源:search.php

示例9: defined

<?php

/**
 * @version		$Id$
 * @package		Joomla.Administrator
 * @subpackage	com_languages
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_languages')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
$controller = JController::getInstance('Languages');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:20,代码来源:languages.php

示例10: defined

<?php

/**
 * @version		$Id: banners.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_banners')) {
    return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
// Helper
require_once JPATH_COMPONENT . '/helpers/jnt_hanhphuc.php';
// Execute the task.
$controller = JController::getInstance('Jnt_HanhPhuc');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:ngxuanmui,项目名称:hanhphuc.vn,代码行数:22,代码来源:jnt_hanhphuc.php

示例11: defined

<?php

/**
 * @package     H5P
 * @subpackage  com_h5p
 * @copyright   Copyright (C) 2013 Joubel AS. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import joomla controller library
jimport('joomla.application.component.controller');
// Get an instance of the controller prefixed by H5P
$controller = JController::getInstance('H5P');
// Get the task
$jinput = JFactory::getApplication()->input;
$task = $jinput->get('task', "", 'STR');
// Perform the Request task
$controller->execute($task);
// Redirect if set by the controller
$controller->redirect();
开发者ID:h5p,项目名称:h5p-joomla-extension,代码行数:21,代码来源:h5p.php

示例12: defined

<?php

defined('_JEXEC') or die;
define('_HELPDESK_VERSION', '1.1');

// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_helpdesk')) {
	return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}

jimport('joomla.application.component.controller');

require_once(JPATH_COMPONENT.'/helpers/helpdesk.php');

$controller	= JController::getInstance('Helpdesk');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:realityking,项目名称:com_rw_helpdesk,代码行数:17,代码来源:helpdesk.php

示例13: defined

/**
 * @package   	SocialLogin Component
 * @copyright 	Copyright 2012 http://www.oneall.com - All rights reserved.
 * @license   	GNU/GPL 2 or later
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 */
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
jimport('joomla.application.component.controller');
// Get an instance of the controller
$controller = JController::getInstance('SocialLogin');
// Perform the requested task
$controller->execute(JRequest::getCmd('task', 'display'));
// Redirect if set by the controller
$controller->redirect();
开发者ID:basethic,项目名称:social-login-joomla,代码行数:31,代码来源:sociallogin.php

示例14: testGetInstance

 /**
  * @todo Implement testGetInstance().
  */
 public function testGetInstance()
 {
     // Remove the following lines when you implement this test.
     $this->markTestIncomplete();
     JController::getInstance('not-found');
 }
开发者ID:nogsus,项目名称:joomla-platform,代码行数:9,代码来源:JControllerTest.php

示例15: defined

<?php

/*
*
*	Quip Forum for Joomla!
*	(c) 2010-2012 Robert Gerald Porter
*
*	Author: 	Robert Gerald Porter <rob@robporter.ca>
*	Version: 	0.3
*   License: 	GPL v3.0
*
*   This extension is free software: you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation, either version 3 of the License, or
*   (at your option) any later version.
*
*   This extension is distributed in the hope that it will be useful,
*   but WITHOUT ANY WARRANTY; without even the implied warranty of
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*   GNU General Public License for more details <http://www.gnu.org/licenses/>.
*	
*/
defined('_JEXEC') or die;
require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'helper' . '.php';
jimport('joomla.application.component.controller');
$controller = JController::getInstance('QuipForum');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();
开发者ID:rgeraldporter,项目名称:com_quipforum,代码行数:28,代码来源:quipforum.php


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