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


PHP lmb_camel_case函数代码示例

本文整理汇总了PHP中lmb_camel_case函数的典型用法代码示例。如果您正苦于以下问题:PHP lmb_camel_case函数的具体用法?PHP lmb_camel_case怎么用?PHP lmb_camel_case使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _addParamsToDataset

 protected function _addParamsToDataset($dataset, $params)
 {
     foreach ($params as $param => $value) {
         $method = lmb_camel_case('set_' . $param, false);
         $dataset->{$method}($value);
     }
 }
开发者ID:r-kitaev,项目名称:limb,代码行数:7,代码来源:lmbFetcher.class.php

示例2: __construct

 /**
  * @param lmbProjectConstructor $project
  * @param lmbDbInfo $database_info
  * @param lmbDbTableInfo $table
  * @param string $model_name
  */
 function __construct($project, $database_info, $table, $model_name = null, $templates_dir = null)
 {
     parent::__construct($project, $database_info, $table, $templates_dir);
     if (is_null($model_name)) {
         $model_name = lmb_camel_case($table->getName());
     }
     $this->_model_name = $model_name;
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:14,代码来源:lmbFrontStuffConstructor.class.php

示例3: testChangeOutput

 function testChangeOutput()
 {
     $cont = $this->_getContainer();
     $cont->setOutputType('gif');
     $class_name = 'lmb' . lmb_camel_case($this->driver) . 'OutputImageFilter';
     $filter = new $class_name(array('type' => 'jpeg'));
     $filter->apply($cont);
     $this->assertEqual($cont->getOutputType(), 'jpeg');
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:9,代码来源:lmbBaseOutputImageFilterTest.class.php

示例4: testCamelCaseDontUcfirst

 function testCamelCaseDontUcfirst()
 {
     $this->assertEqual(lmb_camel_case('foo', false), 'foo');
     $this->assertEqual(lmb_camel_case('foo_bar', false), 'fooBar');
     $this->assertEqual(lmb_camel_case('foo168_bar', false), 'foo168Bar');
     $this->assertEqual(lmb_camel_case('foo_bar_hey_wow', false), 'fooBarHeyWow');
     $this->assertEqual(lmb_camel_case('_foo_bar', false), '_fooBar');
     $this->assertEqual(lmb_camel_case('_foo_bar_', false), '_fooBar_');
     $this->assertEqual(lmb_camel_case('___foo___bar', false), '___foo_Bar');
     $this->assertEqual(lmb_camel_case('___foo___bar_hey', false), '___foo_BarHey');
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:11,代码来源:lmbCoreUtilsTest.class.php

示例5: _fillHints

 function _fillHints()
 {
     $result = array();
     foreach ($this->_hints as $hint) {
         $method = '_get' . lmb_camel_case($hint) . 'Hint';
         $wrapped_hint = $this->_wrapHint($hint);
         if (!strpos($this->_template_sql, $wrapped_hint)) {
             throw new lmbException('Hint ' . $wrapped_hint . ' is not found in template sql "' . $this->_template_sql . '"');
         }
         $result[$wrapped_hint] = $this->{$method}();
     }
     $hints_in_template_sql = $this->_findAndWrapHintsFromTemplateSql();
     foreach ($hints_in_template_sql as $hint) {
         if (!isset($result[$hint])) {
             $result[$hint] = "";
         }
     }
     return $result;
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:19,代码来源:lmbTemplateQuery.class.php

示例6: _createDataSet

 function _createDataSet()
 {
     if (!$this->class_path) {
         throw new lmbException('Class path is not defined!');
     }
     $class_path = new lmbClassPath($this->class_path);
     $class_path->import();
     $class_name = $class_path->getClassName();
     if (is_null($this->record_id) && is_null($this->record_ids)) {
         if (!$this->find) {
             return lmbActiveRecord::find($class_name);
         } else {
             $method = 'find' . lmb_camel_case($this->find);
             $callback = array($class_name, $method);
             if (!is_callable($callback)) {
                 throw new lmbException('Active record of class "' . $class_name . '" does not support method "' . $method . '"');
             }
             return call_user_func_array($callback, $this->find_params);
         }
     }
     if ($this->record_id) {
         try {
             if ($this->find) {
                 $method = 'find' . lmb_camel_case($this->find);
                 $callback = array($class_name, $method);
                 if (!is_callable($callback)) {
                     throw new lmbException('Active record of class "' . $class_name . '" does not support method "' . $method . '"');
                 }
                 $record = call_user_func_array($callback, array($this->record_id));
             } else {
                 $record = lmbActiveRecord::findById($class_name, $this->record_id);
             }
         } catch (lmbARNotFoundException $e) {
             $record = array();
         }
         return $this->_singleItemCollection($record);
     } elseif ($this->record_ids) {
         return lmbActiveRecord::findByIds($class_name, $this->record_ids);
     }
     return new lmbCollection();
 }
开发者ID:knevcher,项目名称:limb,代码行数:41,代码来源:lmbActiveRecordFetcher.class.php

示例7: _mapPropertyToSetMethod

 protected function _mapPropertyToSetMethod($property)
 {
     $method = 'set' . lmb_camel_case($property);
     if ($method !== 'set' && method_exists($this, $method)) {
         return $method;
     }
 }
开发者ID:knevcher,项目名称:limb,代码行数:7,代码来源:lmbObject.class.php

示例8: _mapPropertyToSetMethod

 protected function _mapPropertyToSetMethod($property)
 {
     $this->_ensureSignatures();
     $method = 'set' . lmb_camel_case($property);
     if (isset($this->_tools_signatures[$method])) {
         return $method;
     }
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:8,代码来源:lmbToolkit.class.php

示例9: actionToMethod

 static function actionToMethod($name)
 {
     return lmb_camel_case(self::sanitizeName($name));
 }
开发者ID:knevcher,项目名称:limb,代码行数:4,代码来源:lmbCliRunner.class.php

示例10: getLmbRule

 static function getLmbRule($underscored_name)
 {
     if (isset(self::$rules_shortcuts[$underscored_name])) {
         $underscored_name = self::$rules_shortcuts[$underscored_name];
     }
     return 'lmb' . lmb_camel_case($underscored_name) . 'Rule.class.php';
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbValidatorBuilder.class.php

示例11: _processDispatchResult

 function _processDispatchResult(&$dispatched)
 {
     if (isset($dispatched['controller'])) {
         $dispatched['controller'] = lmb_camel_case($dispatched['controller']);
     }
 }
开发者ID:knevcher,项目名称:limb,代码行数:6,代码来源:lmbRoutesDispatchTest.class.php

示例12: testCamelCaseWithNumbers

 function testCamelCaseWithNumbers()
 {
     $this->assertEqual(lmb_camel_case('foo_0'), 'Foo_0');
     $this->assertEqual(lmb_camel_case('foo_1_bar'), 'Foo_1Bar');
 }
开发者ID:anykey84,项目名称:YaBackup,代码行数:5,代码来源:lmbStringFunctionsTest.class.php

示例13: _mapTableNameToClass

 protected function _mapTableNameToClass($table_name)
 {
     return lmb_camel_case($table_name);
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:4,代码来源:lmbTableGateway.class.php

示例14: mapPropertyToAddToMethod

 /**
  *  Maps property name to "addTo" form, e.g. "property_name" => "addToPropertyName"
  *  @param string
  *  @return string
  */
 function mapPropertyToAddToMethod($property)
 {
     return 'addTo' . lmb_camel_case($property);
 }
开发者ID:redic,项目名称:limb,代码行数:9,代码来源:lmbActiveRecord.class.php

示例15: _formRelationManyToMany

 function _formRelationManyToMany($local_table, $relation_table)
 {
     $local_relation_column_name = $this->_aggrements_resolver->makeRelationColumnNameFromTable($local_table->getName());
     $related_tables = $this->_aggrements_resolver->getManyToManyRelatedTablesFromRelationTable($relation_table);
     $foreign_table = $related_tables[0] == $local_table->getName() ? $this->_db_info->getTable($related_tables[1]) : $this->_db_info->getTable($related_tables[0]);
     return array(lmb_plural($foreign_table->getName()) => array('field' => $local_relation_column_name, 'foreign_field' => $this->_aggrements_resolver->makeRelationColumnNameFromTable($foreign_table), 'table' => $relation_table->getName(), 'class' => lmb_camel_case($foreign_table->getName())));
 }
开发者ID:snowjobgit,项目名称:limb,代码行数:7,代码来源:lmbARRelationConstructor.class.php


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