75 lines
1.6 KiB
PHP
75 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Ixrs\Catalog\Factory;
|
|
|
|
use Ixrs\Catalog\Collection\CatalogCollection;
|
|
use Ixrs\Catalog\Entity\CatalogEntity;
|
|
use Ixrs\Catalog\ORM\CatalogTable;
|
|
use Wt\Core\Factory\AFactory;
|
|
use Wt\Core\Factory\AORMFactory;
|
|
|
|
class CatalogFactory extends AORMFactory
|
|
{
|
|
|
|
/**
|
|
* @return string|CatalogTable
|
|
*/
|
|
protected function __getDataManagerClass()
|
|
{
|
|
return CatalogTable::class;
|
|
}
|
|
|
|
public function __getEntityClass()
|
|
{
|
|
return CatalogEntity::class;
|
|
}
|
|
|
|
public function __getCachePrefix()
|
|
{
|
|
return 'ixrs_catalog';
|
|
}
|
|
|
|
public function __getCollectionClass()
|
|
{
|
|
return CatalogCollection::class;
|
|
}
|
|
|
|
/**
|
|
* @param $id
|
|
* @return CatalogEntity
|
|
*/
|
|
public function getEntityById($id)
|
|
{
|
|
return parent::getEntityById($id);
|
|
}
|
|
|
|
/**
|
|
* @param array $filter
|
|
* @param array $order
|
|
* @param array $select
|
|
* @param null $limit
|
|
* @param null $offset
|
|
* @return CatalogCollection|CatalogEntity[]
|
|
*/
|
|
public function getCollection($filter = [], $order = [], $select = [], $limit = null, $offset = null)
|
|
{
|
|
return parent::getCollection($filter, $order, $select, $limit, $offset); // TODO: Change the autogenerated stub
|
|
}
|
|
|
|
/**
|
|
* @param array $arIds
|
|
* @return CatalogCollection|CatalogEntity[]
|
|
*/
|
|
public function getEntityByIds(array $arIds)
|
|
{
|
|
return parent::getEntityByIds($arIds); // TODO: Change the autogenerated stub
|
|
}
|
|
|
|
/**
|
|
* @return CatalogTable
|
|
*/
|
|
public function getDataManager()
|
|
{
|
|
return parent::getDataManager();
|
|
}
|
|
} |