CsvExportService
Table of Contents
Properties
$fp
protected
resource
$fp
$closed
protected
bool
$closed
= false
$convertEncodingCallBack
protected
Closure
$convertEncodingCallBack
$entityManager
protected
EntityManagerInterface
$entityManager
$qb
protected
mixed
$qb
$eccubeConfig
protected
EccubeConfig
$eccubeConfig
$CsvType
protected
CsvType
$CsvType
$Csvs
protected
\Eccube\Entity\Csv[]
$Csvs
$csvRepository
protected
CsvRepository
$csvRepository
$csvTypeRepository
protected
CsvTypeRepository
$csvTypeRepository
$orderRepository
protected
OrderRepository
$orderRepository
$shippingRepository
protected
ShippingRepository
$shippingRepository
$customerRepository
protected
CustomerRepository
$customerRepository
$productRepository
protected
ProductRepository
$productRepository
$formFactory
protected
FormFactoryInterface
$formFactory
Methods
__construct()
CsvExportService constructor.
public
__construct(
$entityManager :
EntityManagerInterface
, $csvRepository :
CsvRepository
, $csvTypeRepository :
CsvTypeRepository
, $orderRepository :
OrderRepository
, $shippingRepository :
ShippingRepository
, $customerRepository :
CustomerRepository
, $productRepository :
ProductRepository
, $eccubeConfig :
EccubeConfig
, $formFactory :
FormFactoryInterface
)
: mixed
Parameters
- $entityManager : EntityManagerInterface
- $csvRepository : CsvRepository
- $csvTypeRepository : CsvTypeRepository
- $orderRepository : OrderRepository
- $shippingRepository : ShippingRepository
- $customerRepository : CustomerRepository
- $productRepository : ProductRepository
- $eccubeConfig : EccubeConfig
- $formFactory : FormFactoryInterface
Return values
mixedsetConfig()
public
setConfig(
$config :
)
: mixed
Parameters
Return values
mixedsetCsvRepository()
public
setCsvRepository(
$csvRepository :
CsvRepository
)
: mixed
Parameters
- $csvRepository : CsvRepository
Return values
mixedsetCsvTypeRepository()
public
setCsvTypeRepository(
$csvTypeRepository :
CsvTypeRepository
)
: mixed
Parameters
- $csvTypeRepository : CsvTypeRepository
Return values
mixedsetOrderRepository()
public
setOrderRepository(
$orderRepository :
OrderRepository
)
: mixed
Parameters
- $orderRepository : OrderRepository
Return values
mixedsetCustomerRepository()
public
setCustomerRepository(
$customerRepository :
CustomerRepository
)
: mixed
Parameters
- $customerRepository : CustomerRepository
Return values
mixedsetProductRepository()
public
setProductRepository(
$productRepository :
ProductRepository
)
: mixed
Parameters
- $productRepository : ProductRepository
Return values
mixedsetEntityManager()
public
setEntityManager(
$entityManager :
EntityManagerInterface
)
: mixed
Parameters
- $entityManager : EntityManagerInterface
Return values
mixedgetEntityManager()
public
getEntityManager(
)
: EntityManagerInterface
Return values
EntityManagerInterfacesetExportQueryBuilder()
public
setExportQueryBuilder(
$qb :
QueryBuilder
)
: mixed
Parameters
- $qb : QueryBuilder
Return values
mixedinitCsvType()
Csv種別からServiceの初期化を行う.
public
initCsvType(
$CsvType :
mixed
)
: mixed
Parameters
- $CsvType : mixed
Return values
mixedgetCsvs()
public
getCsvs(
)
: \Eccube\Entity\Csv[]
Return values
\Eccube\Entity\Csv[]exportHeader()
ヘッダ行を出力する.
public
exportHeader(
)
: mixed
このメソッドを使う場合は, 事前にinitCsvType($CsvType)で初期化しておく必要がある.
Return values
mixedexportData()
クエリビルダにもとづいてデータ行を出力する.
public
exportData(
$closure :
Closure
)
: mixed
このメソッドを使う場合は, 事前にsetExportQueryBuilder($qb)で出力対象のクエリビルダをわたしておく必要がある.
Parameters
- $closure : Closure
Return values
mixedgetData()
CSV出力項目と比較し, 合致するデータを返す.
public
getData(
$Csv :
Csv
, $entity :
)
: string|null
Parameters
- $Csv : Csv
- $entity :
Return values
string|nullgetConvertEncodingCallback()
文字エンコーディングの変換を行うコールバック関数を返す.
public
getConvertEncodingCallback(
)
: Closure
Return values
Closurefopen()
public
fopen(
)
: mixed
Return values
mixedfputcsv()
public
fputcsv(
$row :
)
: mixed
Parameters
Return values
mixedfclose()
public
fclose(
)
: mixed
Return values
mixedgetOrderQueryBuilder()
受注検索用のクエリビルダを返す.
public
getOrderQueryBuilder(
$request :
Request
)
: QueryBuilder
Parameters
- $request : Request
Return values
QueryBuildergetCustomerQueryBuilder()
会員検索用のクエリビルダを返す.
public
getCustomerQueryBuilder(
$request :
Request
)
: QueryBuilder
Parameters
- $request : Request
Return values
QueryBuildergetProductQueryBuilder()
商品検索用のクエリビルダを返す.
public
getProductQueryBuilder(
$request :
Request
)
: QueryBuilder
Parameters
- $request : Request