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


PHP StringUtils::underscored_to_camel_case方法代码示例

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


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

示例1: create

 public static function create($type, $name, $value = null)
 {
     list($form_class_prefix, $function_name) = explode("/", $type);
     $class_name = StringUtils::underscored_to_camel_case($form_class_prefix) . "FormFieldFactory";
     $form_field_factory = __create_instance($class_name);
     $form_field_factory->{$function_name}($name, $value);
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:7,代码来源:Form.class.php

示例2: executeRequest

 function executeRequest()
 {
     $my_path = Request::getRequestPath();
     $my_name = Request::getRequestName();
     $peer = new PaginePeer();
     $peer->path__EQUAL($my_path);
     $peer->nome__EQUAL($my_name);
     $all_pages = $peer->find();
     $my_page = $all_pages[0];
     $peer_ep = new ElementiPaginaPeer();
     $peer_ep->id_pagina__EQUAL($my_page->id);
     $all_elementi_pagina = $peer_ep->find();
     /*
      * Carico tutti gli elementi pagina
      * Nel nome di un settore eventualmente ci posso mettere una descrizione
      * */
     foreach ($all_elementi_pagina as $elem) {
         $categoria = $elem->categoria;
         $sotto_categoria = $elem->sotto_categoria;
         $specifica = $elem->specifica;
         $categoria_instance = __create_instance(StringUtils::underscored_to_camel_case($categoria) . "SectorRenderer");
         $result = $categoria_instance->{$sotto_categoria}($specifica);
         set_sector($elem->path_settore, $result);
     }
     /*
      * Questi rendering popolano i vari settori a modo loro
      * */
     //render pagina
     render(PageData::instance()->get("/"));
     //trova il layout e renderizza il tutto.
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:31,代码来源:DatabasePagesEngine.class.php

示例3: createRenderer

 static function createRenderer($categoria)
 {
     if (isset(self::$renderers[$categoria])) {
         $renderer_name = $categoria;
     }
     $renderer_class_name = StringUtils::underscored_to_camel_case($renderer_name . "_sector_renderer");
     return __create_instance($renderer_class_name);
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:8,代码来源:SectorRendererRegistry.class.php

示例4: apply

 function apply($peer, $object)
 {
     $type = $object[$this->entity_type_field_name];
     $id = $object[$this->entity_id_field_name];
     $decoration_peer = __create_instance(StringUtils::underscored_to_camel_case($type . "_peer"));
     $decoration = ActiveRecordUtils::toArray($decoration_peer->find_by_id($id));
     $object[$this->entity_type_field_name] = $decoration;
     return array($peer, $object);
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:DecorationPattern.class.php

示例5: apply_patterns

 private static function apply_patterns($result)
 {
     $current_result = $result;
     foreach ($this->patterns as $pattern_name) {
         $pattern_class = __create_instance(StringUtils::underscored_to_camel_case($pattern_name . "_pattern"));
         if ($pattern_class->needs_apply($result)) {
             $current_result = $pattern_class->apply($current_result);
         }
     }
     return $current_result;
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:11,代码来源:ActiveRecordPatterns.class.php

示例6: load_attributes

 static function load_attributes($result)
 {
     $folder_attribs_peer = new FolderAttribsPeer();
     $folder_attribs_peer->id_folder__EQUALS($result["id"]);
     $attribs = $folder_attribs_peer->find();
     $result["attributes"] = array();
     foreach ($attribs as $attr) {
         $attribute_peer = __create_instance(StringUtils::underscored_to_camel_case($attr->attrib_name . "_peer"));
         $attribute_ob = $attribute_peer->find_by_id($attr->attrib_pk);
         if (!isset($result["attributes"][$attr->attrib_name])) {
             $result["attributes"][$attr->attrib_name] = array();
         }
         $result["attributes"][$attr->attrib_name][] = ActiveRecordUtils::toArray($attribute_ob);
     }
     return $result;
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:16,代码来源:FoldersController.class.php

示例7: get_controller_class_from_name

 public static function get_controller_class_from_name($controller_name)
 {
     return StringUtils::underscored_to_camel_case($controller_name) . self::CONTROLLER_NAME_SUFFIX;
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:4,代码来源:ControllerFactory.class.php

示例8: testUnderscoreToCamelCase

 function testUnderscoreToCamelCase()
 {
     $this->assertEqual(StringUtils::underscored_to_camel_case("contenuti_testuali"), "ContenutiTestuali", "Il ritorno a camelcase non funziona correttamente!! : " . StringUtils::underscored_to_camel_case("contenuti_testuali"));
     $this->assertEqual(StringUtils::underscored_to_camel_case("gallery"), "Gallery", "Il ritorno a camelcase non funziona correttamente!! : " . StringUtils::underscored_to_camel_case("gallery"));
     $this->assertEqual(StringUtils::underscored_to_camel_case("camel_case_test"), "CamelCaseTest", "Il ritorno a camelcase non funziona correttamente!! : " . StringUtils::underscored_to_camel_case("camel_case_test"));
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:6,代码来源:string_utils_test.php


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