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


PHP Loader::getClassName方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->typeClass = FF::getClassName('Data\\FilterType');
     $loggerClass = self::$dic['loggerClass'];
     $this->log = $loggerClass::getLogger(__CLASS__);
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:7,代码来源:FilterTypeTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->directionClass = FF::getClassName('Data\\SortingDirection');
     $loggerClass = self::$dic['loggerClass'];
     $this->log = $loggerClass::getLogger(__CLASS__);
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:7,代码来源:SortingDirectionTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->statusClass = FF::getClassName('Data\\ArticleNumberSearchStatus');
     $loggerClass = self::$dic['loggerClass'];
     $this->log = $loggerClass::getLogger(__CLASS__);
 }
开发者ID:s-diez,项目名称:FACT-Finder-PHP-Library,代码行数:7,代码来源:ArticleNumberSearchStatusTest.php

示例4: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     $logClass = FF::getClassName('Util\\Log4PhpLogger');
     $logClass::configure(RESOURCES_DIR . DS . 'log4php.xml');
     // Set up dependency injection container (Pimple)
     self::$dic = FF::getInstance('Util\\Pimple');
     self::$dic['loggerClass'] = $logClass;
     if (strpos(static::class, 'ArrayConfiguration')) {
         self::$dic['configuration'] = function ($c) {
             $config = (include RESOURCES_DIR . DS . 'config.php');
             return FF::getInstance('Core\\ArrayConfiguration', $config, 'test');
         };
     } else {
         self::$dic['configuration'] = function ($c) {
             return FF::getInstance('Core\\XmlConfiguration', RESOURCES_DIR . DS . 'config.xml', 'test');
         };
     }
     // $this cannot be passed into closures before PHP 5.4
     //$that = $this;
     self::$dic['encodingConverter'] = function ($c) {
         if (extension_loaded('iconv')) {
             $type = 'Core\\IConvEncodingConverter';
         } else {
             if (function_exists('utf8_encode') && function_exists('utf8_decode')) {
                 $type = 'Core\\Utf8EncodingConverter';
             } else {
                 return;
             }
         }
         //TODO: Skip test if no conversion method is available.
         //    $that->markTestSkipped('No encoding conversion available.');
         return FF::getInstance($type, $c['loggerClass'], $c['configuration']);
     };
     self::$dic['serverUrlBuilder'] = function ($c) {
         return FF::getInstance('Core\\Server\\UrlBuilder', $c['loggerClass'], $c['configuration']);
     };
     self::$dic['clientUrlBuilder'] = function ($c) {
         return FF::getInstance('Core\\Client\\UrlBuilder', $c['loggerClass'], $c['configuration'], $c['requestParser'], $c['encodingConverter']);
     };
     self::$dic['curlStub'] = function ($c) {
         return FF::getInstance('Util\\CurlStub');
     };
     self::$dic['dataProvider'] = function ($c) {
         $dataProvider = FF::getInstance('Core\\Server\\FileSystemDataProvider', $c['loggerClass'], $c['configuration']);
         $dataProvider->setFileLocation(RESOURCES_DIR . DS . 'responses');
         return $dataProvider;
     };
     self::$dic['requestFactory'] = function ($c) {
         $requestFactory = FF::getInstance('Core\\Server\\FileSystemRequestFactory', $c['loggerClass'], $c['configuration'], $c['requestParser']->getRequestParameters());
         $requestFactory->setFileLocation(RESOURCES_DIR . DS . 'responses');
         return $requestFactory;
     };
     self::$dic['request'] = self::$dic->factory(function ($c) {
         return $c['requestFactory']->getRequest();
     });
     self::$dic['requestParser'] = function ($c) {
         return FF::getInstance('Core\\Client\\RequestParser', $c['loggerClass'], $c['configuration'], $c['encodingConverter']);
     };
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:59,代码来源:BaseTestCase.php

示例5: testNoArticleNumberSearchStatus

 public function testNoArticleNumberSearchStatus()
 {
     $articleNumberSearchStatusEnum = FF::getClassName('Data\\ArticleNumberSearchStatus');
     $this->assertEquals($articleNumberSearchStatusEnum::IsNoArticleNumberSearch(), $this->adapter->getArticleNumberStatus());
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:5,代码来源:SearchTest.php

示例6: createBreadCrumbTrail

 /**
  * @return \FACTFinder\Data\BreadCrumbTrail
  */
 private function createBreadCrumbTrail()
 {
     $breadCrumbs = array();
     $jsonData = $this->getResponseContent();
     if ($this->isValidResponse($jsonData)) {
         $breadCrumbTrailData = $jsonData['searchResult']['breadCrumbTrailItems'];
         if (!empty($breadCrumbTrailData)) {
             $i = 1;
             foreach ($breadCrumbTrailData as $breadCrumbData) {
                 $breadCrumbLink = $this->convertServerQueryToClientUrl($breadCrumbData['searchParams']);
                 $breadCrumbTypeEnum = FF::getClassName('Data\\BreadCrumbType');
                 switch ($breadCrumbData['type']) {
                     case 'filter':
                         $type = $breadCrumbTypeEnum::Filter();
                         break;
                     case 'advisor':
                         $type = $breadCrumbTypeEnum::Advisor();
                         break;
                     default:
                         $type = $breadCrumbTypeEnum::Search();
                         break;
                 }
                 $breadCrumbs[] = FF::getInstance('Data\\BreadCrumb', $breadCrumbData['text'], $breadCrumbLink, $i == count($breadCrumbTrailData), $type, $breadCrumbData['associatedFieldName']);
                 ++$i;
             }
         }
     }
     return FF::getInstance('Data\\BreadCrumbTrail', $breadCrumbs);
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:32,代码来源:Search.php

示例7: isNumberType

 /**
  * @return bool
  */
 public function isNumberType()
 {
     $filterTypeEnum = FF::getClassName('Data\\FilterType');
     return $this->type == $filterTypeEnum::Number();
 }
开发者ID:s-diez,项目名称:FACT-Finder-PHP-Library,代码行数:8,代码来源:FilterGroup.php

示例8: isColorStyle

 /**
  * @return bool
  */
 public function isColorStyle()
 {
     $filterStyleEnum = FF::getClassName('Data\\FilterStyle');
     return $this->style == $filterStyleEnum::Color();
 }
开发者ID:TWT-Interactive,项目名称:FACT-Finder-PHP-Library,代码行数:8,代码来源:FilterGroup.php

示例9: testGetStatus

 public function testGetStatus()
 {
     $searchStatusEnum = FF::getClassName('Data\\SearchStatus');
     $this->assertEquals($searchStatusEnum::RecordsFound(), $this->adapter->getStatus());
 }
开发者ID:TWT-Interactive,项目名称:FACT-Finder-PHP-Library,代码行数:5,代码来源:SearchTest.php

示例10: isDescending

 /**
  * @return bool
  */
 public function isDescending()
 {
     $orderEnum = FF::getClassName('Data\\SortingDirection');
     return $this->order == $orderEnum::Descending();
 }
开发者ID:fact-finder,项目名称:fact-finder-php-library,代码行数:8,代码来源:SortingItem.php

示例11: isFilterBreadCrumb

 /**
  * @return bool
  */
 public function isFilterBreadCrumb()
 {
     $breadCrumbTypeEnum = FF::getClassName('Data\\BreadCrumbType');
     return $this->type == $breadCrumbTypeEnum::Filter();
 }
开发者ID:s-diez,项目名称:FACT-Finder-PHP-Library,代码行数:8,代码来源:BreadCrumb.php


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