Example #1
0
 public function __construct($subject, $config = array())
 {
     $db =& JFactory::getDBO();
     if (!$db instanceof KDatabase) {
         return;
     }
     //Create the application proxy object
     $app =& JFactory::getApplication();
     if ($app instanceof KPatternProxy) {
         $app =& $app->getObject();
     }
     $app = new NookuProxyApplication($app);
     //Create the router proxy object (force load it)
     $router = $app->getRouter();
     //Create the database proxy object
     $db =& JFactory::getDBO();
     if ($db instanceof KPatternProxy) {
         $db =& $db->getObject();
     }
     $db = new NookuProxyDatabase($db);
     //Set the data in the database proxy
     $nooku = KFactory::get('admin::com.nooku.model.nooku');
     $db->setLanguages($nooku->getLanguages());
     $db->setTables($nooku->getTables());
     $db->setPrimaryLanguage($nooku->getPrimaryLanguage()->iso_code);
     //Set the language
     $nooku->setLanguage();
     //Create the language proxy object
     $lang =& JFactory::getLanguage();
     $lang = new NookuProxyLanguage($lang);
     // Add 'metadata' to inflector cache
     KInflector::addWord('metadata', 'metadata');
     // Nooku is active
     define('NOOKU', 1);
     parent::__construct($subject, $config);
 }
Example #2
0
<?php 
// Check if Koowa is active
if (!defined('KOOWA')) {
    JError::raiseWarning(0, JText::_("Koowa wasn't found. Please install the Koowa plugin and enable it."));
    return;
}
KInflector::addWord('items', 'items');
KInflector::addWord('item', 'items');
echo KFactory::get('site::com.component.dispatcher')->dispatch(KRequest::get('get.view', 'cmd', 'items'));
Example #3
0
<?php

/**
 * @package    DOCman
 * @copyright   Copyright (C) 2011 - 2013 Timble CVBA (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */
defined('_JEXEC') or die;
$words = array('event' => 'events', 'controller' => 'controllers', 'behavior' => 'behaviors', 'model' => 'models', 'table' => 'tables', 'database' => 'databases', 'command' => 'commands', 'object' => 'objects', 'adapter' => 'adapters', 'filter' => 'filters', 'view' => 'views', 'template' => 'templates', 'helper' => 'helpers', 'row' => 'rows', 'rowset' => 'rowsets', 'mixin' => 'mixins', 'parameter' => 'parameters', 'category' => 'categories', 'document' => 'documents', 'config' => 'configs', 'container' => 'containers', 'file' => 'files', 'http' => 'https', 'local' => 'locals');
foreach ($words as $singular => $plural) {
    KInflector::addWord($singular, $plural);
}