Pcbis
in package
Class Pcbis
Base class for everything pcbis.de
Table of Contents
- $api : Webservice
- Webservice API client
- __construct() : void
- Constructor
- downgrade() : Product|self
- Performs downgrade (or returns product itself)
- fetch() : array<string|int, mixed>
- Fetches data from API & formats it
- load() : Product
- Instantiates 'Product' object from data OR single EAN/ISBN
- loadAll() : Collection
- Instantiates 'Products' object from multiple EANs/ISBNs
- ola() : Ola
- Checks product availability via OLA ('Online Lieferbarkeits-Abfrage')
- upgrade() : Product|self|null
- Performs upgrade (or returns product itself)
Properties
$api
Webservice API client
public
Webservice
$api
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $credentials = null ]) : void
Parameters
- $credentials : array<string|int, mixed> = null
-
Login credentials
Return values
void —downgrade()
Performs downgrade (or returns product itself)
public
downgrade(Product $object) : Product|self
Parameters
- $object : Product
-
Product to be downgraded
Return values
Product|self —fetch()
Fetches data from API & formats it
public
fetch(string $identifier) : array<string|int, mixed>
Parameters
- $identifier : string
-
Product EAN/ISBN
Return values
array<string|int, mixed> —Matched products (may be empty)
load()
Instantiates 'Product' object from data OR single EAN/ISBN
public
load(string $value) : Product
Parameters
- $value : string
-
Product EAN/ISBN OR its data
Return values
Product —loadAll()
Instantiates 'Products' object from multiple EANs/ISBNs
public
loadAll(array<string|int, mixed> $identifiers) : Collection
Parameters
- $identifiers : array<string|int, mixed>
-
Product EANs/ISBNs
Return values
Collection —ola()
Checks product availability via OLA ('Online Lieferbarkeits-Abfrage')
public
ola(string $identifier[, int $quantity = 1 ][, string $type = 'anfrage' ]) : Ola
Parameters
- $identifier : string
-
Product EAN/ISBN
- $quantity : int = 1
-
Number of products to be delivered
- $type : string = 'anfrage'
-
OLA type (either 'anfrage', 'bestellung' or 'storno')
Return values
Ola —upgrade()
Performs upgrade (or returns product itself)
public
upgrade(Product $object) : Product|self|null
Parameters
- $object : Product
-
Product to be upgraded