Beispiel #1
0
$class = JRequest::getVar('controller');
$ctrller = !is_null($redirect) ? $redirect : $view;
$ctrller = is_null($ctrller) ? $class : $ctrller;
$ctrller = is_null($ctrller) ? "core" : $ctrller;
/**
 * Proxy mode calls made here
 */
/**
 * Application/Core/System/Resource ?
 */
$isApp = TuiyoLoader::controllerIsApp($ctrller);
if (!$isApp) {
    $controller = TuiyoLoader::controller($ctrller, true);
} else {
    JRequest::setVar("app", $ctrller);
    $controller = TuiyoLoader::controller("apps", true);
}
/**
 * Perform the Request task
 */
$controller->execute(JRequest::getVar('do', null));
/**
 * Close the TuiYo pInterface
 */
TuiyoAPI::close();
//$loca = $GLOBALS["API"]->get("localization" , "en_GB");
/**
 * Redirect if specified
 */
$document->addJSDefines();
$document->finishBuild();
Beispiel #2
0
 * @since     : 1.0.0 alpha                                         *   
 * @package   : tuiyo                                               *
 * ******************************************************************
 */
/**
 * no direct access
 */
defined('TUIYO_EXECUTE') || die('Restricted access');
/**
 * joomla Controller
 */
jimport('joomla.application.component.controller');
/**
 * Tuiyo Controller
 */
TuiyoLoader::controller('core');
/**
 * TuiyoControllerWelcome
 * 
 * @package tuiyo
 * @author Livingstone Fultang
 * @copyright 2009
 * @version $Id$
 * @access public
 */
class TuiyoControllerWelcome extends JController
{
    /**
     * Welcome view object
     */
    private $view = null;
Beispiel #3
0
 /**
  * TuiyoLoader::controller()
  * Loads a controller from the public controllers
  * @param mixed $fileName
  * @param bool $createInstance
  * @param mixed $parameters
  * @return
  */
 public function controller($fileName, $createInstance = false, $parameters = null)
 {
     TuiyoLoader::import($fileName, 'controller');
     if ($createInstance) {
         $controllerClass = ucfirst(TUIYO_LIB) . 'Controller' . ucfirst(self::$_loaded[$fileName]);
         if (in_array($controllerClass, self::$_stored["controllers"])) {
             $object = self::$_stored["controllers"][$controllerClass];
             if (is_object($object)) {
                 return $object;
             } else {
                 unset(self::$_stored["controllers"][$controllerClass]);
                 TuiyoLoader::controller($fileName, $createInstance, $parameters);
             }
         }
         $controller = new $controllerClass($parameters);
         self::$_stored["controllers"][$controllerClass] =& $controller;
         return $controller;
     }
 }