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


PHP TextHelper::camelize方法代码示例

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


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

示例1: visual_effect

 /**
  * Returns a JavaScript snippet to be used on the AJAX callbacks for starting
  * visual effects.
  *
  * Example:
  *  ScriptaculousHelper::visual_effect('highlight', 'posts',
  *    array('duration' => 0.5 ));
  *
  * If no '$element_id' is given, it assumes "element" which should be a local
  * variable in the generated JavaScript execution context. This can be used
  * for example with drop_receiving_element():
  *
  *  ScriptaculousHelper::drop_receving_element(..., array(...
  *        'loading' => ScriptaculousHelper::visual_effect('fade')));
  *
  * This would fade the element that was dropped on the drop receiving element.
  *
  * You can change the behaviour with various options, see
  * http://script.aculo.us for more documentation.
  *
  * @param type <description>
  * @param type <description>
  * @param type <description>
  *
  * @return string <description>
  */
 function visual_effect($name, $element_id = FALSE, $js_opt = array())
 {
     $element = $element_id ? "'{$element_id}'" : 'element';
     switch ($name) {
         case 'toggle_appear':
         case 'toggle_blind':
         case 'toggle_slide':
             return sprintf("new Effect.toggle(%s, '%s', %s)", $element, substr($name, 7), JsHelper::options_for_javascript($js_opt));
     }
     return sprintf("new Effect.%s(%s, %s)", TextHelper::camelize($name), $element, JsHelper::options_for_javascript($js_opt));
 }
开发者ID:ratbird,项目名称:hope,代码行数:37,代码来源:scriptaculous_helper.php

示例2: insert_html

 /**
  * Inserts HTML at the specified 'position' relative to the DOM element
  * identified by the given 'id'.
  *
  * 'position' may be one of:
  *
  * 'top'::    HTML is inserted inside the element, before the
  *            element's existing content.
  * 'bottom':: HTML is inserted inside the element, after the
  *            element's existing content.
  * 'before':: HTML is inserted immediately preceeding the element.
  * 'after'::  HTML is inserted immediately following the element.
  *
  * @param type <description>
  * @param type <description>
  * @param type <description>
  *
  * @return type <description>
  */
 function insert_html($position, $id, $content)
 {
     $insertion = TextHelper::camelize($position);
     $this->call('new Insertion.' . $insertion, $id, $content);
 }
开发者ID:ratbird,项目名称:hope,代码行数:24,代码来源:prototype_helper.php

示例3: test_camelize

 function test_camelize()
 {
     $foo = TextHelper::camelize('foo_bar_baz/FOO is great');
     $this->assertEqual('FooBarBazFOOIsGreat', $foo);
 }
开发者ID:ratbird,项目名称:hope,代码行数:5,代码来源:text_helper_test.php


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