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


PHP KInflector::addWord方法代码示例

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


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

示例1: __construct

 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);
 }
开发者ID:janssit,项目名称:www.reliancelaw.be,代码行数:36,代码来源:nooku.php

示例2:

<?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'));
开发者ID:rpijpers,项目名称:Create,代码行数:9,代码来源:component.php

示例3: defined

<?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);
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:13,代码来源:init.php


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