CategoryService
in package
Table of Contents
Constants
- FEED_URL = 'http://transport.productsup.io/48ab79321df6c10b2211/channel/188040/vidaXL_fr_dropshipping.csv'
Properties
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $productFeedDirPath : string
- $productFeedFile : mixed
Methods
- __construct() : mixed
- QueueService constructor.
- checkFeedDirectory() : mixed
- check if directory exist
- downloadFeed() : mixed
- getCategoryTree() : mixed
- getRepo() : CategoryRepository
- importCategoriesVidaxl() : mixed
- Improt Categories
- printTree() : string
- save() : Category
- Save The Entity
- convertToTree() : mixed
Constants
FEED_URL
public
mixed
FEED_URL
= 'http://transport.productsup.io/48ab79321df6c10b2211/channel/188040/vidaXL_fr_dropshipping.csv'
Properties
$container
private
ContainerInterface
$container
$entityManager
private
EntityManagerInterface
$entityManager
$productFeedDirPath
private
string
$productFeedDirPath
$productFeedFile
private
mixed
$productFeedFile
Methods
__construct()
QueueService constructor.
public
__construct(ContainerInterface $container, EntityManagerInterface $entityManager) : mixed
Parameters
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
checkFeedDirectory()
check if directory exist
public
checkFeedDirectory() : mixed
downloadFeed()
public
downloadFeed() : mixed
getCategoryTree()
public
getCategoryTree([mixed $all = true ]) : mixed
Parameters
- $all : mixed = true
getRepo()
public
getRepo() : CategoryRepository
Return values
CategoryRepositoryimportCategoriesVidaxl()
Improt Categories
public
importCategoriesVidaxl() : mixed
printTree()
public
static printTree(mixed $tree[, int $r = 0 ][, null $p = null ][, null $sousCategory = null ]) : string
Parameters
- $tree : mixed
- $r : int = 0
- $p : null = null
- $sousCategory : null = null
Return values
stringsave()
Save The Entity
public
save(Category $category) : Category
Parameters
- $category : Category
Return values
CategoryconvertToTree()
private
convertToTree(array<string|int, mixed> $flat, mixed $pidKey[, null $idKey = null ][, mixed $all = true ]) : mixed
Parameters
- $flat : array<string|int, mixed>
- $pidKey : mixed
- $idKey : null = null
- $all : mixed = true