Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter

Class CategoryRepositoryReader

Class CategoryRepositoryReader

This class provides methods for fetching specific category records from the database and is used in the category repository among the classes for writing and deleting category records.

CategoryRepositoryReader implements CategoryRepositoryReaderInterface
Package: Category\Repositories
Category: System
Located at CoreServices/Category/Repositories/Reader/CategoryRepositoryReader.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db, CategoryFactoryInterface $categoryFactory )

CategoryRepositoryReader constructor.

CategoryRepositoryReader constructor.

Parameters

$db
Database connector.
$categoryFactory
Category factory.
public StoredCategoryInterface
# getById( IdType $categoryId )

Returns a category.

Returns a category.

Parameters

$categoryId
Category ID.

Returns

StoredCategoryInterface

Throws

UnexpectedValueException
if no category record for the provided category ID was found.

Implementation of

CategoryRepositoryReaderInterface::getById()
public IdCollection
# getByParentId( IdType $parentId )

Returns all Categories with the provided parent ID.

Returns all Categories with the provided parent ID.

Parameters

$parentId

Returns

IdCollection

Implementation of

CategoryRepositoryReaderInterface::getByParentId()
protected StoredCategory
# _createCategoryByArray( array $categoryData, array $categoryDescriptionData )

Creates a category instance.

Creates a category instance.

Parameters

$categoryData
Category query result.
$categoryDescriptionData
Category description query result.

Returns

StoredCategory
Returns the complete category object.

Properties summary

protected CI_DB_query_builder $db

Database connector.

Database connector.

#
protected CategoryFactoryInterface $categoryFactory

Category factory.

Category factory.

#
API documentation generated by ApiGen