本文整理汇总了PHP中SwatDBClassMap::addPath方法的典型用法代码示例。如果您正苦于以下问题:PHP SwatDBClassMap::addPath方法的具体用法?PHP SwatDBClassMap::addPath怎么用?PHP SwatDBClassMap::addPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SwatDBClassMap
的用法示例。
在下文中一共展示了SwatDBClassMap::addPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadPage
<?php
require_once 'Pinhole/Pinhole.php';
require_once 'Pinhole/layouts/PinholeLayout.php';
require_once 'Site/SiteWebApplication.php';
require_once 'Site/SiteConfigModule.php';
require_once 'Site/SiteDatabaseModule.php';
require_once 'Site/SiteAnalyticsModule.php';
require_once 'Site/SiteErrorLogger.php';
require_once 'Site/SiteExceptionLogger.php';
require_once 'Swat/exceptions/SwatException.php';
require_once 'Swat/SwatError.php';
require_once 'Swat/SwatForm.php';
require_once 'SwatDB/SwatDBClassMap.php';
SwatDBClassMap::addPath(dirname(__FILE__) . '/dataobjects');
/**
* Pinhole-based demo gallery
*
* @package PinholeDemo
* @copyright 2007-2010 silverorange
*/
class Application extends SiteWebApplication
{
// {{{ protected function loadPage()
protected function loadPage()
{
if (isset($this->config->locale)) {
setlocale($this->config->locale);
} else {
setlocale(LC_ALL, 'en_CA.UTF-8');
}
示例2: setupGettext
public static function setupGettext()
{
$path = '@DATA-DIR@/Deliverance/locale';
if (substr($path, 0, 1) === '@') {
$path = dirname(__FILE__) . '/../locale';
}
bindtextdomain(Deliverance::GETTEXT_DOMAIN, $path);
bind_textdomain_codeset(Deliverance::GETTEXT_DOMAIN, 'UTF-8');
}
// }}}
// {{{ public static function getConfigDefinitions()
/**
* Gets configuration definitions used by the Deliverance package
*
* Applications should add these definitions to their config module before
* loading the application configuration.
*
* @return array the configuration definitions used by the Deliverance
* package.
*
* @see SiteConfigModule::addDefinitions()
*/
public static function getConfigDefinitions()
{
return array('deliverance.list_connection_timeout' => 1, 'deliverance.list_admin_connection_timeout' => 5, 'deliverance.list_script_connection_timeout' => 300, 'deliverance.campaign_from_name' => null, 'deliverance.campaign_from_address' => null, 'deliverance.segment_include_addresses' => null, 'deliverance.campaign_cdn_base' => null, 'deliverance.automatic_analytics_tagging' => false, 'deliverance.analytics_utm_source' => null, 'deliverance.analytics_utm_medium' => 'email', 'deliverance.analytics_utm_campaign' => '%s', 'mail_chimp.double_opt_in' => false, 'mail_chimp.api_key' => null, 'mail_chimp.user_id' => null, 'mail_chimp.default_list' => null, 'mail_chimp.default_folder' => null, 'mail_chimp.preview_url' => 'http://%s.campaign-archive.com/?u=%s&id=%s', 'mail_chimp.list_title' => null, 'mail_chimp.source' => null);
}
}
Deliverance::setupGettext();
SwatUI::mapClassPrefixToPath('Deliverance', 'Deliverance');
SwatDBClassMap::addPath('Deliverance/dataobjects');