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


PHP camelcase函数代码示例

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


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

示例1: getLegacyKeyClass

 public function getLegacyKeyClass()
 {
     $class = camelcase($this->getCategoryEntity()->getAttributeKeyCategoryHandle());
     $prefix = $this->getCategoryEntity()->getPackageID() > 0 ? $this->getCategoryEntity()->getPackageHandle() : false;
     $class = core_class('Core\\Attribute\\Key\\' . $class . 'Key', $prefix);
     return $class;
 }
开发者ID:seebaermichi,项目名称:concrete5,代码行数:7,代码来源:LegacyCategory.php

示例2: import

 public function import(\SimpleXMLElement $sx)
 {
     $em = \Database::connection()->getEntityManager();
     $em->getClassMetadata('Concrete\\Core\\Entity\\Express\\Association')->setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator());
     if (isset($sx->expressentities)) {
         foreach ($sx->expressentities->entity as $entityNode) {
             if (isset($entityNode->associations)) {
                 foreach ($entityNode->associations->association as $associationNode) {
                     $association = $em->find('Concrete\\Core\\Entity\\Express\\Association', (string) $associationNode['id']);
                     if (!is_object($association)) {
                         $class = '\\Concrete\\Core\\Entity\\Express\\' . camelcase((string) $associationNode['type']) . 'Association';
                         $association = new $class();
                         $association->setId((string) $associationNode['id']);
                     }
                     /**
                      * @var $association \Concrete\Core\Entity\Express\Association
                      */
                     $association->setTargetPropertyName((string) $associationNode['target-property-name']);
                     $association->setInversedByPropertyName((string) $associationNode['inversed-by-property-name']);
                     $em->persist($association);
                 }
             }
         }
     }
     $em->flush();
     $em->getClassMetadata('Concrete\\Core\\Entity\\Express\\Association')->setIdGenerator(new UuidGenerator());
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:27,代码来源:ImportExpressAssociationsRoutine.php

示例3: controller

 public static function controller($item)
 {
     if ($item instanceof \Page) {
         return $item->getController();
     }
     $controller = '\\Concrete\\Controller\\' . camelcase($item);
     return new $controller();
 }
开发者ID:digideskio,项目名称:concrete5,代码行数:8,代码来源:Loader.php

示例4: testCamelcase

 /**
  * test camelcase
  */
 public function testCamelcase()
 {
     $this->assertEquals('fooBar', camelcase('foo bar'));
     $this->assertEquals('fooBar', camelcase('FooBar'));
     $this->assertEquals('fooBar', camelcase('foo-bar'));
     $this->assertEquals('fooBar', camelcase('foo_bar'));
     $this->assertEquals('fooBarBazQUX', camelcase('foo - bar, .Baz QUX'));
 }
开发者ID:sachsy,项目名称:php-functions,代码行数:11,代码来源:CaseFunctionsTest.php

示例5: getConfigurationObject

 /**
  * @return \Concrete\Core\File\StorageLocation\Configuration\ConfigurationInterface
  */
 public function getConfigurationObject()
 {
     if ($this->getPackageID()) {
         return Core::make('\\Concrete\\Package\\' . camelcase($this->getPackageHandle()) . '\\Core\\File\\StorageLocation\\Configuration\\' . camelcase($this->getHandle()) . 'Configuration');
     } else {
         return Core::make('\\Concrete\\Core\\File\\StorageLocation\\Configuration\\' . camelcase($this->getHandle()) . 'Configuration');
     }
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:11,代码来源:Type.php

示例6: getController

 protected function getController()
 {
     try {
         $class = camelcase(substr($this->filename, 0, strrpos($this->filename, '.php')));
         return \Core::make('\\Concrete\\Block\\ExternalForm\\Form\\Controller\\' . $class);
     } catch (\Exception $e) {
     }
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:8,代码来源:controller.php

示例7: driver

 public function driver($driver = null)
 {
     $method = 'create' . camelcase($driver) . 'Driver';
     // If a custom driver is not registered, we use unmapped
     if ($driver && !isset($this->customCreators[$driver]) && !method_exists($this, $method)) {
         return $this->createStandardDriver();
     }
     return parent::driver($driver);
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:9,代码来源:Manager.php

示例8: getLibrary

 public static function getLibrary()
 {
     if (!PageCache::$library) {
         $adapter = Config::get('concrete.cache.page.adapter');
         $class = overrideable_core_class('Core\\Cache\\Page\\' . camelcase($adapter) . 'PageCache', DIRNAME_CLASSES . '/Cache/Page/' . camelcase($adapter) . 'PageCache.php');
         PageCache::$library = new $class();
     }
     return PageCache::$library;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:9,代码来源:PageCache.php

示例9: controller

 public static function controller($item)
 {
     if ($item instanceof \Page) {
         return $item->getController();
     }
     $controller = '\\Concrete\\Controller\\' . camelcase($item);
     $app = Facade::getFacadeApplication();
     return $app->build($controller);
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:9,代码来源:Loader.php

示例10: getClass

 public static function getClass($pkgHandle)
 {
     if (is_dir(DIR_STARTING_POINT_PACKAGES . '/' . $pkgHandle)) {
         $class = '\\Application\\StartingPointPackage\\' . camelcase($pkgHandle) . '\\Controller';
     } else {
         $class = '\\Concrete\\StartingPointPackage\\' . camelcase($pkgHandle) . '\\Controller';
     }
     $cl = new $class();
     return $cl;
 }
开发者ID:robertdamoc,项目名称:concrete5,代码行数:10,代码来源:StartingPointPackage.php

示例11: getController

 protected function getController()
 {
     try {
         $class = camelcase(substr($this->filename, 0, strrpos($this->filename, '.php')));
         $cl = \Core::make(overrideable_core_class('Block\\ExternalForm\\Form\\Controller\\' . $class, DIRNAME_BLOCKS . '/external_form/form/controller/' . $this->filename));
         $cl->bID = $this->bID;
         return $cl;
     } catch (\Exception $e) {
     }
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:10,代码来源:controller.php

示例12: getController

 public function getController()
 {
     if (isset($this->controller)) {
         return $this->controller;
     } else {
         $class = overrideable_core_class('MenuItem\\' . camelcase($this->handle) . '\\Controller', DIRNAME_MENU_ITEMS . '/' . $this->handle . '/' . FILENAME_CONTROLLER, $this->pkgHandle);
         $this->setController(\Core::make($class, array($this)));
         return $this->controller;
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:10,代码来源:Item.php

示例13: registerPackage

 public function registerPackage(Package $pkg)
 {
     $symfonyLoader = new SymfonyClassloader();
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Attribute', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_ATTRIBUTES);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Authentication', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_AUTHENTICATION);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Block', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_BLOCKS);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Theme', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_THEMES);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Controller\\PageType', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_CONTROLLERS . '/' . DIRNAME_PAGE_TYPES);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Controller', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_CONTROLLERS);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()) . '\\Job', DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_JOBS);
     $symfonyLoader->addPrefix(NAMESPACE_SEGMENT_VENDOR . '\\Package\\' . camelcase($pkg->getPackageHandle()), DIR_PACKAGES . '/' . $pkg->getPackageHandle() . '/' . DIRNAME_CLASSES);
     $symfonyLoader->register();
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:13,代码来源:ClassLoader.php

示例14: parse

 public function parse()
 {
     $sl = new StyleList();
     foreach ($this->root->set as $xset) {
         $set = $sl->addSet((string) $xset['name']);
         foreach ($xset->style as $xstyle) {
             $type = camelcase((string) $xstyle['type']);
             $style = Core::make('\\Concrete\\Core\\StyleCustomizer\\Style\\' . $type . 'Style');
             $style->setName((string) $xstyle['name']);
             $style->setVariable((string) $xstyle['variable']);
             $set->addStyle($style);
         }
     }
     return $sl;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:15,代码来源:StyleListParser.php

示例15: getByHandle

 public static function getByHandle($scsHandle)
 {
     $db = Loader::db();
     $r = $db->GetRow('select scsHandle, scsIsActive, pkgID, scsName from SystemContentEditorSnippets where scsHandle = ?', array($scsHandle));
     if (is_array($r) && $r['scsHandle']) {
         $pkgHandle = false;
         if ($r['pkgID']) {
             $pkgHandle = PackageList::getHandle($r['pkgID']);
         }
         $class = overrideable_core_class('Core\\Editor\\' . camelcase($r['scsHandle']) . 'Snippet', DIRNAME_CLASSES . '/Editor/' . camelcase($r['scsHandle']) . 'Snippet.php', $pkgHandle);
         $sc = Core::make($class);
         $sc->setPropertiesFromArray($r);
         return $sc;
     }
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:15,代码来源:Snippet.php


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