FileAccess Orion

Basic extends BaseContent
in package
Uses TextAuthor, Extras, DataHash

Class Basic

This is the basic content that all subtypes may extend

Tags
category

Core content type

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.0.1

Table of Contents

$ignore_hash_fields  : array<string|int, mixed>
__construct()  : mixed
Basic constructor.
Author()  : User|null
Get the original author of the task
CreateExtra()  : Result
Create a new extra
DeleteExtra()  : Result
Delete the extra
FetchExtras()  : Result
Fetch extra list
GetExtra()  : Result
Fetch single extra
Hash()  : string
Generate hash of current contents
UpdateExtra()  : Result
Update the extra
extrasPath()  : string
Helper to get the extras path
writeExtra()  : Result
Store extras

Properties

$ignore_hash_fields

protected array<string|int, mixed> $ignore_hash_fields = ['last_changed_by', 'last_changed_at']

Methods

__construct()

Basic constructor.

public __construct([null $id = null ][, null $language = null ][, string $subtype = 'basic' ]) : mixed
Parameters
$id : null = null
$language : null = null
$subtype : string = 'basic'
Return values
mixed

Author()

Get the original author of the task

public Author() : User|null
Return values
User|null

CreateExtra()

Create a new extra

public CreateExtra(string $type, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
$type : string
$data : array<string|int, mixed>
$individual : bool = true
Return values
Result

DeleteExtra()

Delete the extra

public DeleteExtra(string $type[, string|null $id = null ][, bool $individual = true ]) : Result
Parameters
$type : string

The extras type

$id : string|null = null

The id or null to drop all of certain kind

$individual : bool = true

Is individual file or, in all full list?

Return values
Result

FetchExtras()

Fetch extra list

public FetchExtras(string $type[, bool $individual = true ]) : Result
Parameters
$type : string
$individual : bool = true
Return values
Result

GetExtra()

Fetch single extra

public GetExtra(string $type, string $id) : Result
Parameters
$type : string
$id : string
Return values
Result

Hash()

Generate hash of current contents

public Hash() : string
Return values
string

UpdateExtra()

Update the extra

public UpdateExtra(string $type, string $id, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
$type : string

The extras type

$id : string

The item primary key

$data : array<string|int, mixed>

The new data

$individual : bool = true

Is individual file or in all full list?

Return values
Result

extrasPath()

Helper to get the extras path

private extrasPath(string $type) : string
Parameters
$type : string
Return values
string

writeExtra()

Store extras

private writeExtra(string $file, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
$file : string

The target file

$data : array<string|int, mixed>

The new row

$individual : bool = true

Save in individual file?

Return values
Result

Search results