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


PHP core_class函数代码示例

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


在下文中一共展示了core_class函数的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: getPermissionKeyByID

 public function getPermissionKeyByID($pkID)
 {
     $txt = Loader::helper('text');
     $className = core_class('\\Core\\Permission\\Key\\' . \Core::make("helper/text")->camelcase($this->pkCategoryHandle) . 'Key', $this->getPackageHandle());
     $ak = call_user_func(array($className, 'getByID'), $pkID);
     return $ak;
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:7,代码来源:Category.php

示例3: __call

 public function __call($method, $arguments)
 {
     $className = '\\Core\\Workflow\\Progress\\' . Loader::helper('text')->camelcase($this->wpCategoryHandle) . 'Progress';
     $pkHandle = $this->getPackageHandle();
     $class = core_class($className, $pkHandle);
     return call_user_func_array(array($class, $method), $arguments);
 }
开发者ID:ngreimel,项目名称:kovent,代码行数:7,代码来源:Category.php

示例4: loadController

 /**
  * Load the AuthenticationTypeController into the AuthenticationType
  */
 protected function loadController()
 {
     $env = Environment::get();
     $r = $env->getRecord(DIRNAME_AUTHENTICATION . '/' . $this->authTypeHandle . '/' . FILENAME_CONTROLLER);
     $prefix = $r->override ? true : $this->getPackageHandle();
     $authTypeHandle = Core::make('helper/text')->camelcase($this->authTypeHandle);
     $class = core_class('Authentication\\' . $authTypeHandle . '\\Controller', $prefix);
     $this->controller = Core::make($class, array($this));
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:12,代码来源:AuthenticationType.php

示例5: getWorkflowProgressCategoryClass

 public function getWorkflowProgressCategoryClass()
 {
     $className = '\\Core\\Workflow\\Progress\\' . Loader::helper('text')->camelcase($this->wpCategoryHandle) . 'Progress';
     $pkHandle = $this->getPackageHandle();
     $class = core_class($className, $pkHandle);
     if (class_exists($class)) {
         $c = new $class();
         return $c;
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:10,代码来源:Category.php

示例6: testClassDefine

 public function testClassDefine()
 {
     $pt = $this->sl->make('\\Concrete\\Core\\Page\\Theme\\Theme');
     $this->assertTrue($pt instanceof \Concrete\Core\Page\Theme\Theme);
     $class1 = core_class('Core\\Page\\Theme\\Theme');
     $class2 = core_class('Core\\Page\\Theme\\RiverTheme', 'river_theme');
     $class3 = core_class('Core\\Page\\Theme\\Theme', true);
     $this->assertTrue($class1 == '\\Concrete\\Core\\Page\\Theme\\Theme', 'class1 == ' . $class1);
     $this->assertTrue($class2 == '\\Concrete\\Package\\RiverTheme\\Core\\Page\\Theme\\RiverTheme', 'class2 == ' . $class2);
     $this->assertTrue($class3 == '\\Application\\Core\\Page\\Theme\\Theme', 'class3 == ' . $class3);
 }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:11,代码来源:ServiceLocatorTest.php

示例7: testCoreClassFunction

 public function testCoreClassFunction()
 {
     $class = core_class('\\Block\\TestBlock\\Controller');
     $this->assertEquals('\\Concrete\\Block\\TestBlock\\Controller', $class);
     $class = core_class('\\Block\\TestBlock\\Controller', 'foo_bar');
     $this->assertEquals('\\Concrete\\Package\\FooBar\\Block\\TestBlock\\Controller', $class);
     $class = overrideable_core_class('\\Src\\Captcha\\AkismetController', '/foo', 'akismet');
     $this->assertEquals('\\Concrete\\Package\\Akismet\\Src\\Captcha\\AkismetController', $class);
     // now for the weird one.
     // We need to already have these files included so that the autoloader doesn't break
     require 'fixtures/FakeAkismetPackageController.php';
     require 'fixtures/FakeCalendarPackageController.php';
     $class = overrideable_core_class('\\Core\\Captcha\\AkismetController', '/foo', 'akismet');
     $this->assertEquals('\\Concrete\\Package\\Akismet\\Src\\Captcha\\AkismetController', $class);
     $class = core_class('Core\\Attribute\\Key\\EventKey', 'calendar');
     $this->assertEquals('\\Concrete\\Package\\Calendar\\Src\\Attribute\\Key\\EventKey', $class);
 }
开发者ID:masteramuk,项目名称:concrete5,代码行数:17,代码来源:ClassloaderTest.php

示例8: getByID

 public static final function getByID($peID)
 {
     $obj = CacheLocal::getEntry('permission_access_entity', $peID);
     if ($obj instanceof PermissionAccessEntity) {
         return $obj;
     }
     $db = Database::connection();
     $r = $db->GetRow('select petID, peID from PermissionAccessEntities where peID = ?', array($peID));
     if (is_array($r)) {
         $pt = Type::getByID($r['petID']);
         if (!is_object($pt)) {
             return false;
         }
         $class = '\\Core\\Permission\\Access\\Entity\\' . Core::make('helper/text')->camelcase($pt->getAccessEntityTypeHandle()) . 'Entity';
         $class = core_class($class, $pt->getPackageHandle());
         $obj = Core::make($class);
         $r['petHandle'] = $pt->getAccessEntityTypeHandle();
         $obj->setPropertiesFromArray($r);
         $obj->load();
     }
     CacheLocal::set('permission_access_entity', $peID, $obj);
     return $obj;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:23,代码来源:Entity.php

示例9: renderComposerOutputForm

 public function renderComposerOutputForm($page = null, $targetPage = null)
 {
     $env = \Environment::get();
     $elementController = $env->getRecord(DIRNAME_CONTROLLERS . '/element/page_type/composer/form/output/form/' . $this->getPageTypeHandle() . '.php', $this->getPackageHandle());
     $element = $env->getRecord(DIRNAME_ELEMENTS . '/' . DIRNAME_PAGE_TYPES . '/composer/form/output/form/' . $this->getPageTypeHandle() . '.php', $this->getPackageHandle());
     if ($elementController->exists()) {
         $elementController = core_class('Controller\\Element\\PageType\\Composer\\Form\\Output\\Form\\' . camelcase($this->getPageTypeHandle()), $this->getPackageHandle());
         $elementController = \Core::make($elementController);
         $elementController->setPageTypeObject($this);
         if (is_object($page)) {
             $elementController->setPageObject($page);
         }
         if (is_object($targetPage)) {
             $elementController->setTargetPageObject($targetPage);
         }
         $elementController->setPackageHandle($this->getPackageHandle());
         $elementController->render();
     } else {
         if ($element->exists()) {
             $pagetype = $this;
             include $element->file;
         } else {
             Loader::element('page_types/composer/form/output/form', array('pagetype' => $this, 'page' => $page, 'targetPage' => $targetPage));
         }
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:26,代码来源:Type.php

示例10: getBlockTypeMappedClass

 /**
  * Return the class file that this BlockType uses
  *
  * @return string
  */
 public static function getBlockTypeMappedClass($btHandle, $pkgHandle = false)
 {
     $env = Environment::get();
     $txt = Loader::helper('text');
     $r = $env->getRecord(DIRNAME_BLOCKS . '/' . $btHandle . '/' . FILENAME_CONTROLLER);
     // Replace $pkgHandle if overridden via environment
     $r->pkgHandle and $pkgHandle = $r->pkgHandle;
     $prefix = $r->override ? true : $pkgHandle;
     $class = core_class('Block\\' . $txt->camelcase($btHandle) . '\\Controller', $prefix);
     return $class;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:16,代码来源:BlockType.php

示例11: getController

 public function getController()
 {
     // Note, you can't cache this against the type class itself –it needs to return
     // a new instance every time because sometimes attribute specific keys get
     // bound to the controller and then if it caches against type the wrong controller
     // key combination gets returned with this call.
     //if (!isset($this->controller)) {
     $env = \Environment::get();
     $r = $env->getRecord(DIRNAME_ATTRIBUTES . '/' . $this->atHandle . '/' . FILENAME_CONTROLLER);
     $prefix = $r->override ? true : $this->getPackageHandle();
     $atHandle = \Core::make('helper/text')->camelcase($this->atHandle);
     $class = core_class('Attribute\\' . $atHandle . '\\Controller', $prefix);
     $controller = \Core::make($class);
     $controller->setAttributeType($this);
     return $controller;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:16,代码来源:Type.php

示例12: getByID

 public static function getByID($wfID)
 {
     $db = Loader::db();
     $r = $db->GetRow('select WorkflowTypes.wftHandle, WorkflowTypes.pkgID from Workflows inner join WorkflowTypes on Workflows.wftID = WorkflowTypes.wftID where Workflows.wfID = ?', array($wfID));
     if ($r['wftHandle']) {
         $class = '\\Core\\Workflow\\' . Loader::helper('text')->camelcase($r['wftHandle']) . 'Workflow';
         if ($r['pkgID']) {
             $pkg = Package::getByID($r['pkgID']);
             $prefix = $pkg->getPackageHandle();
         }
         $class = core_class($class, $prefix);
         $obj = Core::make($class);
         $obj->load($wfID);
         if ($obj->getWorkflowID() > 0) {
             $obj->loadDetails();
             return $obj;
         }
     }
 }
开发者ID:WillemAnchor,项目名称:concrete5,代码行数:19,代码来源:Workflow.php

示例13: getPermissionKeyClass

 public function getPermissionKeyClass()
 {
     $className = core_class('\\Core\\Permission\\Key\\' . Core::make("helper/text")->camelcase($this->pkCategoryHandle) . 'Key', $this->getPackageHandle());
     return $className;
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:5,代码来源:Category.php

示例14: getByID

 public static function getByID($wpID)
 {
     $db = Database::connection();
     $r = $db->fetchAssoc('select WorkflowProgress.*, WorkflowProgressCategories.wpCategoryHandle, WorkflowProgressCategories.pkgID from WorkflowProgress inner join WorkflowProgressCategories on WorkflowProgress.wpCategoryID = WorkflowProgressCategories.wpCategoryID where wpID  = ?', array($wpID));
     if (!is_array($r) || !$r['wpID']) {
         return false;
     }
     $class = '\\Core\\Workflow\\Progress\\' . Core::make('helper/text')->camelcase($r['wpCategoryHandle']) . 'Progress';
     if ($r['pkgID']) {
         $pkgHandle = PackageList::getHandle($r['pkgID']);
     }
     $class = core_class($class, $pkgHandle);
     $wp = Core::make($class);
     $wp->setPropertiesFromArray($r);
     $wp->loadDetails();
     return $wp;
 }
开发者ID:digideskio,项目名称:concrete5,代码行数:17,代码来源:Progress.php

示例15: add

 /**
  * @param string $akCategoryHandle The handle string for the category
  * @param int $akCategoryAllowSets This should be an attribute Category::ASET_ALLOW_* constant
  * @param bool|\Package $pkg The package object that the category belongs to, false if it does not belong to a package
  * @return self|null Returns the category object if it was added successfully, or null if it failed to be added
  */
 public static function add($akCategoryHandle, $akCategoryAllowSets = 0, $pkg = false)
 {
     $pkgID = null;
     if (is_object($pkg)) {
         $pkgID = $pkg->getPackageID();
     }
     Database::connection()->executeQuery('INSERT INTO AttributeKeyCategories (akCategoryHandle, akCategoryAllowSets, pkgID) values (?, ?, ?)', array($akCategoryHandle, $akCategoryAllowSets, $pkgID));
     $id = Database::connection()->lastInsertId();
     $txt = Core::make('helper/text');
     $prefix = $pkgID > 0 ? $pkg->getPackageHandle() : false;
     $class = core_class('Core\\Attribute\\Key\\' . $txt->camelcase($akCategoryHandle) . 'Key', $prefix);
     /** @var \Concrete\Core\Attribute\Key\Key $obj This is really a specific category key object*/
     $obj = new $class();
     $obj->createIndexedSearchTable();
     return static::getByID($id);
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:22,代码来源:Category.php


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