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


PHP JString::splitCamelCase方法代码示例

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


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

示例1: __construct

 /**
  * Method to instantiate the form field object.
  *
  * @param   object  $form  The form to attach to the form field object.
  *
  * @since   11.1
  */
 public function __construct($form = null)
 {
     // If there is a form passed into the constructor set the form and form control properties.
     if ($form instanceof JForm) {
         $this->form = $form;
         $this->formControl = $form->getFormControl();
     }
     // Detect the field type if not set
     if (!isset($this->type)) {
         $parts = JString::splitCamelCase(get_called_class());
         if ($parts[0] == 'J') {
             $this->type = JString::ucfirst($parts[count($parts) - 1], '_');
         } else {
             $this->type = JString::ucfirst($parts[0], '_') . JString::ucfirst($parts[count($parts) - 1], '_');
         }
     }
 }
开发者ID:raquelsa,项目名称:Joomla,代码行数:24,代码来源:field.php

示例2: __construct

 /**
  * Method to instantiate the form field object.
  *
  * @param   object  $form  The form to attach to the form field object.
  *
  * @since   11.1
  */
 public function __construct($form = null)
 {
     parent::__construct($form);
     // Detect the field type if not set
     if (!isset($this->type)) {
         $parts = JString::splitCamelCase(get_class($this));
         if ($parts[0] == 'J') {
             $this->type = JString::ucfirst($parts[count($parts) - 1], '_');
         } else {
             $this->type = JString::ucfirst($parts[0], '_') . JString::ucfirst($parts[count($parts) - 1], '_');
         }
     }
     $this->assets_content = $this->container->getParameter('form.field.assets.context');
 }
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:21,代码来源:AbstractField.php

示例3: __construct

 /**
  * Method to instantiate the form field object.
  *
  * @param   object  $form  The form to attach to the form field object.
  *
  * @since   11.1
  */
 public function __construct($form = null)
 {
     parent::__construct($form);
     // Detect the field type if not set
     if (!isset($this->type)) {
         $parts = JString::splitCamelCase(get_class($this));
         if ($parts[0] == 'J') {
             $this->type = JString::ucfirst($parts[count($parts) - 1], '_');
         } else {
             $this->type = JString::ucfirst($parts[0], '_') . JString::ucfirst($parts[count($parts) - 1], '_');
         }
     }
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:20,代码来源:AbstractField.php

示例4: testSplitCamelCase

 /**
  * @return  void
  *
  * @dataProvider  getSplitCamelCaseData
  * @since   11.3
  */
 public function testSplitCamelCase($string, $expected)
 {
     $this->assertThat(JString::splitCamelCase($string), $this->equalTo($expected));
 }
开发者ID:n3t,项目名称:joomla-platform,代码行数:10,代码来源:JStringTest.php


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