ArticleMovement
in package
Implement movement object
This class provides general interfaces to handle article movements.
Tags
Table of Contents
- $article : Article|null
- The article buffer
- $default_source : string|null
- Default source folder
- $default_target : string|null
- $root : string
- The base path
- $row : array<string|int, mixed>|null
- The data storage
- $sf : Storage|null
- Source folder buffer
- $tf : Storage|null
- Target folder buffer
- __construct() : mixed
- constructor.
- Amount() : int|float
- Get amount
- Article() : Article|null
- Get linked article
- Execute() : Result
- Source() : string
- Get the source path
- SourceFolder() : Storage|null
- Get source folder
- SourceRelation() : string
- Target() : string
- The target folder path
- TargetFolder() : Storage|null
- Get target folder
- TargetRelation() : string
- registerRelation() : Result
- Register the relation
Properties
$article
The article buffer
private
Article|null
$article
= null
?Article
$default_source
Default source folder
private
string|null
$default_source
$default_target
private
string|null
$default_target
$root
The base path
private
string
$root
$row
The data storage
private
array<string|int, mixed>|null
$row
$sf
Source folder buffer
private
Storage|null
$sf
= null
$tf
Target folder buffer
private
Storage|null
$tf
= null
Methods
__construct()
constructor.
public
__construct(array<string|int, mixed> $row[, string $root = 'media/storage' ][, string|null $default_source = null ][, string|null $default_target = null ]) : mixed
Parameters
- $row : array<string|int, mixed>
-
A row price object
- $root : string = 'media/storage'
-
Path to the storage root
- $default_source : string|null = null
- $default_target : string|null = null
Return values
mixed —Amount()
Get amount
public
Amount() : int|float
Get the stored amount value
Return values
int|float —The entry amount
Article()
Get linked article
public
Article() : Article|null
Load the linked article from storage
Return values
Article|null —Execute()
public
Execute([array<string|int, mixed> $conf = array() ]) : Result
Parameters
- $conf : array<string|int, mixed> = array()
Return values
Result —Source()
Get the source path
public
Source() : string
Return values
string —SourceFolder()
Get source folder
public
SourceFolder() : Storage|null
Return values
Storage|null —SourceRelation()
public
SourceRelation() : string
Return values
string —Target()
The target folder path
public
Target() : string
Return values
string —TargetFolder()
Get target folder
public
TargetFolder() : Storage|null
Return values
Storage|null —TargetRelation()
public
TargetRelation() : string
Return values
string —registerRelation()
Register the relation
private
registerRelation(string $path, array<string|int, mixed> $payload) : Result
Parameters
- $path : string
-
The path to the folder
- $payload : array<string|int, mixed>
-
The relation data