本文整理汇总了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__);
}
示例2: setUp
public function setUp()
{
parent::setUp();
$this->directionClass = FF::getClassName('Data\\SortingDirection');
$loggerClass = self::$dic['loggerClass'];
$this->log = $loggerClass::getLogger(__CLASS__);
}
示例3: setUp
public function setUp()
{
parent::setUp();
$this->statusClass = FF::getClassName('Data\\ArticleNumberSearchStatus');
$loggerClass = self::$dic['loggerClass'];
$this->log = $loggerClass::getLogger(__CLASS__);
}
示例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']);
};
}
示例5: testNoArticleNumberSearchStatus
public function testNoArticleNumberSearchStatus()
{
$articleNumberSearchStatusEnum = FF::getClassName('Data\\ArticleNumberSearchStatus');
$this->assertEquals($articleNumberSearchStatusEnum::IsNoArticleNumberSearch(), $this->adapter->getArticleNumberStatus());
}
示例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);
}
示例7: isNumberType
/**
* @return bool
*/
public function isNumberType()
{
$filterTypeEnum = FF::getClassName('Data\\FilterType');
return $this->type == $filterTypeEnum::Number();
}
示例8: isColorStyle
/**
* @return bool
*/
public function isColorStyle()
{
$filterStyleEnum = FF::getClassName('Data\\FilterStyle');
return $this->style == $filterStyleEnum::Color();
}
示例9: testGetStatus
public function testGetStatus()
{
$searchStatusEnum = FF::getClassName('Data\\SearchStatus');
$this->assertEquals($searchStatusEnum::RecordsFound(), $this->adapter->getStatus());
}
示例10: isDescending
/**
* @return bool
*/
public function isDescending()
{
$orderEnum = FF::getClassName('Data\\SortingDirection');
return $this->order == $orderEnum::Descending();
}
示例11: isFilterBreadCrumb
/**
* @return bool
*/
public function isFilterBreadCrumb()
{
$breadCrumbTypeEnum = FF::getClassName('Data\\BreadCrumbType');
return $this->type == $breadCrumbTypeEnum::Filter();
}