本文整理汇总了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);
}
示例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.
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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"));
}