PHP Class Eccube\Service\CsvExportService

Afficher le fichier Open project: ec-cube/ec-cube

Protected Properties

Свойство 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;

Méthodes publiques

Méthode 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 )

Méthodes protégées

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

Method Details

exportData() public méthode

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

exportHeader() public méthode

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

fclose() public méthode

public fclose ( )

findDeserializeObjects() protected méthode

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

fopen() public méthode

public fopen ( )

fputcsv() public méthode

public fputcsv ( $row )
$row

getConvertEncodhingCallback() public méthode

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

getCsvs() public méthode

public getCsvs ( ) : Eccube\Entity\Csv[]
Résultat Eccube\Entity\Csv[]

getCustomerQueryBuilder() public méthode

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

getData() public méthode

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

getEntityManager() public méthode

public getEntityManager ( ) : EntityManager
Résultat Doctrine\ORM\EntityManager

getOrderQueryBuilder() public méthode

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

getProductQueryBuilder() public méthode

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

initCsvType() public méthode

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

setConfig() public méthode

public setConfig ( $config )
$config

setCsvRepository() public méthode

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

setCsvTypeRepository() public méthode

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

setCustomerRepository() public méthode

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

setEntityManager() public méthode

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

setExportQueryBuilder() public méthode

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

setOrderRepository() public méthode

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

setProductRepository() public méthode

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

Property Details

$CsvType protected_oe property

protected CsvType,Eccube\Entity\Master $CsvType
Résultat Eccube\Entity\Master\CsvType

$Csvs protected_oe property

protected Csv[],Eccube\Entity $Csvs
Résultat Eccube\Entity\Csv[]

$closed protected_oe property

protected $closed

$config protected_oe property

protected array $config
Résultat array

$convertEncodingCallBack protected_oe property

protected Closure $convertEncodingCallBack
Résultat Closure

$csvRepository protected_oe property

protected CsvRepository,Eccube\Repository $csvRepository
Résultat Eccube\Repository\CsvRepository

$csvTypeRepository protected_oe property

protected CsvTypeRepository,Eccube\Repository\Master $csvTypeRepository
Résultat Eccube\Repository\Master\CsvTypeRepository

$customerRepository protected_oe property

protected CustomerRepository,Eccube\Repository $customerRepository
Résultat Eccube\Repository\CustomerRepository

$em protected_oe property

protected EntityManager,Doctrine\ORM $em
Résultat Doctrine\ORM\EntityManager

$fp protected_oe property

protected $fp

$orderRepository protected_oe property

protected OrderRepository,Eccube\Repository $orderRepository
Résultat Eccube\Repository\OrderRepository

$productRepository protected_oe property

protected ProductRepository,Eccube\Repository $productRepository
Résultat Eccube\Repository\ProductRepository

$qb protected_oe property

protected QueryBuilder;,Doctrine\ORM $qb
Résultat Doctrine\ORM\QueryBuilder;