PHP Class Eccube\Service\CsvExportService

Exibir arquivo Open project: ec-cube/ec-cube

Protected Properties

Property Type Description
$CsvType Eccube\Entity\Master\CsvType
$Csvs Eccube\Entity\Csv[]
$closed
$config array
$convertEncodingCallBack Closure
$csvRepository Eccube\Repository\CsvRepository
$csvTypeRepository Eccube\Repository\Master\CsvTypeRepository
$customerRepository Eccube\Repository\CustomerRepository
$em Doctrine\ORM\EntityManager
$fp
$orderRepository Eccube\Repository\OrderRepository
$productRepository Eccube\Repository\ProductRepository
$qb Doctrine\ORM\QueryBuilder;

Public Methods

Method Description
exportData ( Closure $closure ) クエリビルダにもとづいてデータ行を出力する.
exportHeader ( ) ヘッダ行を出力する.
fclose ( )
fopen ( )
fputcsv ( $row )
getConvertEncodhingCallback ( ) : Closure 文字エンコーディングの変換を行うコールバック関数を返す.
getCsvs ( ) : Eccube\Entity\Csv[]
getCustomerQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder 会員検索用のクエリビルダを返す.
getData ( Eccube\Entity\Csv $Csv, $entity ) : mixed | null | string | void CSV出力項目と比較し, 合致するデータを返す.
getEntityManager ( ) : EntityManager
getOrderQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder 受注検索用のクエリビルダを返す.
getProductQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder 商品検索用のクエリビルダを返す.
initCsvType ( $CsvType ) Csv種別からServiceの初期化を行う.
setConfig ( $config )
setCsvRepository ( Eccube\Repository\CsvRepository $csvRepository )
setCsvTypeRepository ( Eccube\Repository\Master\CsvTypeRepository $csvTypeRepository )
setCustomerRepository ( CustomerRepository $customerRepository )
setEntityManager ( EntityManager $em )
setExportQueryBuilder ( Doctrine\ORM\QueryBuilder $qb )
setOrderRepository ( OrderRepository $orderRepository )
setProductRepository ( ProductRepository $productRepository )

Protected Methods

Method Description
findDeserializeObjects ( array &$searchData ) セッションでシリアライズされた Doctrine のオブジェクトを取得し直す.

Method Details

exportData() public method

このメソッドを使う場合は, 事前にsetExportQueryBuilder($qb)で出力対象のクエリビルダをわたしておく必要がある.
public exportData ( Closure $closure )
$closure Closure

exportHeader() public method

このメソッドを使う場合は, 事前にinitCsvType($CsvType)で初期化しておく必要がある.
public exportHeader ( )

fclose() public method

public fclose ( )

findDeserializeObjects() protected method

XXX self::setExportQueryBuilder() をコールする前に EntityManager を取得したいので、引数で渡している
protected findDeserializeObjects ( array &$searchData )
$searchData array セッションから取得した検索条件の配列

fopen() public method

public fopen ( )

fputcsv() public method

public fputcsv ( $row )
$row

getConvertEncodhingCallback() public method

文字エンコーディングの変換を行うコールバック関数を返す.

getCsvs() public method

public getCsvs ( ) : Eccube\Entity\Csv[]
return Eccube\Entity\Csv[]

getCustomerQueryBuilder() public method

会員検索用のクエリビルダを返す.
public getCustomerQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder
$request Symfony\Component\HttpFoundation\Request
return Doctrine\ORM\QueryBuilder

getData() public method

CSV出力項目と比較し, 合致するデータを返す.
public getData ( Eccube\Entity\Csv $Csv, $entity ) : mixed | null | string | void
$Csv Eccube\Entity\Csv
$entity
return mixed | null | string | void

getEntityManager() public method

public getEntityManager ( ) : EntityManager
return Doctrine\ORM\EntityManager

getOrderQueryBuilder() public method

受注検索用のクエリビルダを返す.
public getOrderQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder
$request Symfony\Component\HttpFoundation\Request
return Doctrine\ORM\QueryBuilder

getProductQueryBuilder() public method

商品検索用のクエリビルダを返す.
public getProductQueryBuilder ( Request $request ) : Doctrine\ORM\QueryBuilder
$request Symfony\Component\HttpFoundation\Request
return Doctrine\ORM\QueryBuilder

initCsvType() public method

Csv種別からServiceの初期化を行う.
public initCsvType ( $CsvType )

setConfig() public method

public setConfig ( $config )
$config

setCsvRepository() public method

public setCsvRepository ( Eccube\Repository\CsvRepository $csvRepository )
$csvRepository Eccube\Repository\CsvRepository

setCsvTypeRepository() public method

public setCsvTypeRepository ( Eccube\Repository\Master\CsvTypeRepository $csvTypeRepository )
$csvTypeRepository Eccube\Repository\Master\CsvTypeRepository

setCustomerRepository() public method

public setCustomerRepository ( CustomerRepository $customerRepository )
$customerRepository Eccube\Repository\CustomerRepository

setEntityManager() public method

public setEntityManager ( EntityManager $em )
$em Doctrine\ORM\EntityManager

setExportQueryBuilder() public method

public setExportQueryBuilder ( Doctrine\ORM\QueryBuilder $qb )
$qb Doctrine\ORM\QueryBuilder

setOrderRepository() public method

public setOrderRepository ( OrderRepository $orderRepository )
$orderRepository Eccube\Repository\OrderRepository

setProductRepository() public method

public setProductRepository ( ProductRepository $productRepository )
$productRepository Eccube\Repository\ProductRepository

Property Details

$CsvType protected_oe property

protected CsvType,Eccube\Entity\Master $CsvType
return Eccube\Entity\Master\CsvType

$Csvs protected_oe property

protected Csv[],Eccube\Entity $Csvs
return Eccube\Entity\Csv[]

$closed protected_oe property

protected $closed

$config protected_oe property

protected array $config
return array

$convertEncodingCallBack protected_oe property

protected Closure $convertEncodingCallBack
return Closure

$csvRepository protected_oe property

protected CsvRepository,Eccube\Repository $csvRepository
return Eccube\Repository\CsvRepository

$csvTypeRepository protected_oe property

protected CsvTypeRepository,Eccube\Repository\Master $csvTypeRepository
return Eccube\Repository\Master\CsvTypeRepository

$customerRepository protected_oe property

protected CustomerRepository,Eccube\Repository $customerRepository
return Eccube\Repository\CustomerRepository

$em protected_oe property

protected EntityManager,Doctrine\ORM $em
return Doctrine\ORM\EntityManager

$fp protected_oe property

protected $fp

$orderRepository protected_oe property

protected OrderRepository,Eccube\Repository $orderRepository
return Eccube\Repository\OrderRepository

$productRepository protected_oe property

protected ProductRepository,Eccube\Repository $productRepository
return Eccube\Repository\ProductRepository

$qb protected_oe property

protected QueryBuilder;,Doctrine\ORM $qb
return Doctrine\ORM\QueryBuilder;