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


PHP sfWidgetFormSchemaFormatter::setTranslationCallable方法代码示例

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


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

示例1: array_merge

<?php

// auto-generated by sfFactoryConfigHandler
// date: 2011/06/03 16:22:59
$class = sfConfig::get('sf_factory_logger', 'sfAggregateLogger');
$this->factories['logger'] = new $class($this->dispatcher, array_merge(array('auto_shutdown' => false), sfConfig::get('sf_factory_logger_parameters', array('level' => 'debug'))));
$logger = new sfWebDebugLogger($this->dispatcher, array_merge(array('auto_shutdown' => false), array('level' => 'debug', 'xdebug_logging' => true, 'web_debug_class' => 'sfWebDebug')));
$this->factories['logger']->addLogger($logger);
$logger = new sfFileLogger($this->dispatcher, array_merge(array('auto_shutdown' => false), array('level' => 'debug', 'file' => '/opt/httpd-builtin-2.2.0/afids/log/frontend_dev.log')));
$this->factories['logger']->addLogger($logger);
if (sfConfig::get('sf_i18n')) {
    $class = sfConfig::get('sf_factory_i18n', 'sfI18N');
    $cache = new sfFileCache(array('automatic_cleaning_factor' => 0, 'cache_dir' => '/opt/httpd-builtin-2.2.0/afids/cache/frontend/dev/i18n', 'lifetime' => 31556926, 'prefix' => '/opt/httpd-builtin-2.2.0/afids/apps/frontend/i18n'));
    $this->factories['i18n'] = new $class($this->configuration, $cache, array('source' => 'XLIFF', 'debug' => false, 'untranslated_prefix' => '[T]', 'untranslated_suffix' => '[/T]'));
    sfWidgetFormSchemaFormatter::setTranslationCallable(array($this->factories['i18n'], '__'));
}
$class = sfConfig::get('sf_factory_controller', 'sfFrontWebController');
$this->factories['controller'] = new $class($this);
$class = sfConfig::get('sf_factory_request', 'sfWebRequest');
$this->factories['request'] = new $class($this->dispatcher, array(), array(), sfConfig::get('sf_factory_request_parameters', array('logging' => '1', 'path_info_array' => 'SERVER', 'path_info_key' => 'PATH_INFO', 'relative_url_root' => NULL, 'formats' => array('txt' => 'text/plain', 'js' => array(0 => 'application/javascript', 1 => 'application/x-javascript', 2 => 'text/javascript'), 'css' => 'text/css', 'json' => array(0 => 'application/json', 1 => 'application/x-json'), 'xml' => array(0 => 'text/xml', 1 => 'application/xml', 2 => 'application/x-xml'), 'rdf' => 'application/rdf+xml', 'atom' => 'application/atom+xml'), 'no_script_name' => false)), sfConfig::get('sf_factory_request_attributes', array()));
$class = sfConfig::get('sf_factory_response', 'sfWebResponse');
$this->factories['response'] = new $class($this->dispatcher, sfConfig::get('sf_factory_response_parameters', array_merge(array('http_protocol' => isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : null), array('logging' => '1', 'charset' => 'utf-8', 'send_http_headers' => true))));
if ($this->factories['request'] instanceof sfWebRequest && $this->factories['response'] instanceof sfWebResponse && 'HEAD' == $this->factories['request']->getMethod()) {
    $this->factories['response']->setHeaderOnly(true);
}
$class = sfConfig::get('sf_factory_routing', 'sfPatternRouting');
$cache = null;
$this->factories['routing'] = new $class($this->dispatcher, $cache, array_merge(array('auto_shutdown' => false, 'context' => $this->factories['request']->getRequestContext()), sfConfig::get('sf_factory_routing_parameters', array('load_configuration' => true, 'suffix' => '', 'default_module' => 'default', 'default_action' => 'index', 'debug' => '1', 'logging' => '1', 'generate_shortest_url' => true, 'extra_parameters_as_query_string' => true, 'cache' => NULL))));
if ($parameters = $this->factories['routing']->parse($this->factories['request']->getPathInfo())) {
    $this->factories['request']->addRequestParameters($parameters);
}
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:config_factories.yml.php


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