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


PHP overrideable_core_class函数代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: getByHandle

 public static function getByHandle($ptPublishTargetTypeHandle)
 {
     $db = Loader::db();
     $r = $db->GetRow('select ptPublishTargetTypeID, ptPublishTargetTypeHandle, ptPublishTargetTypeName, pkgID from PageTypePublishTargetTypes where ptPublishTargetTypeHandle = ?', array($ptPublishTargetTypeHandle));
     if (is_array($r) && $r['ptPublishTargetTypeHandle']) {
         $txt = Loader::helper('text');
         $class = overrideable_core_class('Core\\Page\\Type\\PublishTarget\\Type\\' . $txt->camelcase($r['ptPublishTargetTypeHandle']) . 'Type', DIRNAME_CLASSES . '/Page/Type/PublishTarget/Type/' . $txt->camelcase($r['ptPublishTargetTypeHandle']) . '.php', PackageList::getHandle($r['pkgID']));
         $sc = Core::make($class);
         $sc->setPropertiesFromArray($r);
         return $sc;
     }
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:12,代码来源:Type.php

示例5: 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

示例6: getClass

 protected static function getClass($row)
 {
     $standardClass = '\\Concrete\\Core\\User\\Point\\Action\\Action';
     if ($row['upaHasCustomClass']) {
         $handleClass = Core::make('helper/text')->camelcase($row['upaHandle']) . 'Action';
         $pkgHandle = PackageList::getHandle($row['pkgID']);
         $customClass = overrideable_core_class('Core\\User\\Point\\Action\\' . $handleClass, DIRNAME_CLASSES . '/User/Point/Action/' . $handleClass . '.php', $pkgHandle);
         try {
             $upa = Core::make($customClass);
         } catch (\ReflectionException $e) {
             $upa = Core::make($standardClass);
         }
     } else {
         $upa = Core::make($standardClass);
     }
     return $upa;
 }
开发者ID:WillemAnchor,项目名称:concrete5,代码行数:17,代码来源:Action.php

示例7: testUpgradedPackageSrcFiles

 public function testUpgradedPackageSrcFiles()
 {
     $env = Environment::get();
     $env->clearOverrideCache();
     require 'fixtures/amazing_power.php';
     $package = new \Concrete\Package\AmazingPower\Controller();
     $loader = ClassLoader::getInstance();
     $loader->registerPackage($package);
     $root = dirname(DIR_BASE_CORE . '../');
     @mkdir($root . '/packages/amazing_power/src/ElectricState/Routing', 0777, true);
     @mkdir($root . '/packages/amazing_power/src/Concrete/Captcha', 0777, true);
     @copy(dirname(__FILE__) . '/fixtures/amazing_power/RouteHelper.php', $root . '/packages/amazing_power/src/ElectricState/Routing/RouteHelper.php');
     @copy(dirname(__FILE__) . '/fixtures/amazing_power/AkismetController.php', $root . '/packages/amazing_power/src/Concrete/Captcha/AkismetController.php');
     $class = overrideable_core_class('\\Captcha\\AkismetController', 'Captcha/AkismetController.php', $package->getPackageHandle());
     $this->assertEquals('\\Concrete\\Package\\AmazingPower\\Captcha\\AkismetController', $class);
     $this->assertTrue(class_exists('\\Concrete\\Package\\AmazingPower\\Captcha\\AkismetController'));
     $this->assertTrue(class_exists('\\ElectricState\\AmazingPower\\Routing\\RouteHelper'));
     @unlink($root . '/packages/amazing_power/src/ElectricState/Routing/RouteHelper.php');
     @unlink($root . '/packages/amazing_power/src/Concrete/Captcha/AkismetController.php');
     @rmdir($root . '/packages/amazing_power/src/ElectricState/Routing');
     @rmdir($root . '/packages/amazing_power/src/ElectricState');
     @unlink($root . '/packages/amazing_power/src/Concrete/Captcha');
     @unlink($root . '/packages/amazing_power/src/Concrete');
     @unlink($root . '/packages/amazing_power/src');
     @unlink($root . '/packages/amazing_power');
 }
开发者ID:masteramuk,项目名称:concrete5,代码行数:26,代码来源:ClassloaderTest.php

示例8: getController

 /**
  * Returns the controller class for the currently selected captcha library.
  *
  * @return mixed
  */
 public function getController()
 {
     $class = overrideable_core_class('Core\\Antispam\\' . camelcase($this->saslHandle) . 'Controller', DIRNAME_CLASSES . '/Antispam/' . camelcase($this->saslHandle) . 'Controller.php', $this->getPackageHandle());
     $app = Facade::getFacadeApplication();
     $cl = $app->make($class);
     return $cl;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:12,代码来源:Library.php

示例9: getCustomInspector

 public function getCustomInspector()
 {
     $name = camelcase($this->getCustomImporter()) . 'Inspector';
     $class = overrideable_core_class('Core\\File\\Type\\Inspector\\' . $name, 'File/Type/Inspector/' . $name . '.php', $this->getPackageHandle());
     $cl = Core::make($class);
     return $cl;
 }
开发者ID:kreativmind,项目名称:concrete5-5.7.0,代码行数:7,代码来源:Type.php

示例10: importAttributes

 protected function importAttributes(\SimpleXMLElement $sx)
 {
     $db = Database::connection();
     if (isset($sx->attributekeys)) {
         foreach ($sx->attributekeys->attributekey as $ak) {
             $akc = AttributeKeyCategory::getByHandle($ak['category']);
             $akID = $db->GetOne('select akID from AttributeKeys where akHandle = ? and akCategoryID = ?', array($ak['handle'], $akc->getAttributeKeyCategoryID()));
             if (!$akID) {
                 $txt = Core::make('helper/text');
                 $c1 = overrideable_core_class('\\Core\\Attribute\\Key\\' . $txt->camelcase($akc->getAttributeKeyCategoryHandle()) . 'Key', DIRNAME_CLASSES . '/Attribute/Key/' . $txt->camelcase($akc->getAttributeKeyCategoryHandle()) . 'Key.php', (string) $akc->getPackageHandle());
                 call_user_func(array($c1, 'import'), $ak);
             }
         }
     }
 }
开发者ID:digideskio,项目名称:concrete5,代码行数:15,代码来源:ContentImporter.php

示例11: getCustomInspector

 /**
  * Get the inspector for this file type (if available).
  *
  * @return \Concrete\Core\File\Type\Inspector|null
  */
 public function getCustomInspector()
 {
     $importer = $this->getCustomImporter();
     if ($importer === '') {
         $result = null;
     } else {
         $name = camelcase($importer) . 'Inspector';
         $class = overrideable_core_class('Core\\File\\Type\\Inspector\\' . $name, 'File/Type/Inspector/' . $name . '.php', $this->getPackageHandle());
         $app = Application::getFacadeApplication();
         $result = $app->make($class);
     }
     return $result;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:18,代码来源:Type.php

示例12: getAccessEntityTypeClass

 /**
  * Returns the controller class for the currently selected captcha library.
  */
 public function getAccessEntityTypeClass()
 {
     $class = overrideable_core_class('Core\\Permission\\Access\\Entity\\' . Loader::helper('text')->camelcase($this->petHandle) . 'Entity', DIRNAME_CLASSES . '/Permission/Access/Entity/' . Loader::helper('text')->camelcase($this->petHandle) . 'Entity.php', $this->getPackageHandle());
     return $class;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:8,代码来源:Type.php

示例13: getClassName

 protected static function getClassName($jHandle, $pkgHandle = null)
 {
     $class = overrideable_core_class('Job\\' . camelcase($jHandle), DIRNAME_JOBS . '/' . $jHandle . '.php', $pkgHandle);
     return $class;
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:5,代码来源:Job.php

示例14: getController

 /**
  * Returns the controller class for the currently selected captcha library
  */
 public function getController()
 {
     $class = overrideable_core_class('Core\\Captcha\\' . Loader::helper('text')->camelcase($this->sclHandle) . 'Controller', DIRNAME_CLASSES . '/Captcha/' . Loader::helper('text')->camelcase($this->sclHandle) . 'Controller.php', $this->getPackageHandle());
     $cl = Core::make($class);
     return $cl;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:9,代码来源:Library.php

示例15: importAttributes

 protected function importAttributes(\SimpleXMLElement $sx)
 {
     if (isset($sx->attributekeys)) {
         foreach ($sx->attributekeys->attributekey as $ak) {
             $akc = AttributeKeyCategory::getByHandle($ak['category']);
             $type = AttributeType::getByHandle($ak['type']);
             $txt = Loader::helper('text');
             $c1 = overrideable_core_class('\\Core\\Attribute\\Key\\' . $txt->camelcase($akc->getAttributeKeyCategoryHandle()) . 'Key', DIRNAME_CLASSES . '/Attribute/Key/' . $txt->camelcase($akc->getAttributeKeyCategoryHandle()) . 'Key.php', (string) $akc->getPackageHandle());
             $ak = call_user_func(array($c1, 'import'), $ak);
         }
     }
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:12,代码来源:ContentImporter.php


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