Documentation

SetSpider
in package

Entity Set Spider.

Spider class for all the paginator entity sets. The spider walks through files from the entity set root directory building an internal representation of the entities contained in it, building a set→category→entity metadata tree of the whole set directory. The tree is stored as a CachedJson object.

Tags
author

Davide Lanza davide.lanza@eikonproject.org

Table of Contents

Properties

$set  : Set
$cache  : CachedJson
$entity_class  : string

Methods

__construct()  : mixed
Construct a `Spider` object
generate()  : array<string|int, mixed>
Create the set→category→entity metadata tree of the set.
get()  : array<string|int, mixed>
Get the set→category→entity metadata tree of the category.
store()  : array<string|int, mixed>
Store the set→category→entity metadata tree of the category.
_create_entity()  : BaseEntity
Create an entity of the class specified by $this->entity_class

Properties

Methods

__construct()

Construct a `Spider` object

public __construct(Set $set, string $entity_class, string $cache_dir) : mixed
Parameters
$set : Set

the spider ebtity set.

$entity_class : string

the class of BaseEntity-derived classes in the set.

$cache_dir : string

the cache directory.

Tags
author

Davide Lanza davide.lanza@eikonproject.org

generate()

Create the set→category→entity metadata tree of the set.

public generate() : array<string|int, mixed>
Tags
author

Davide Lanza davide.lanza@eikonproject.org

Return values
array<string|int, mixed>

the set→category→entity metadata tree of the set.

get()

Get the set→category→entity metadata tree of the category.

public get() : array<string|int, mixed>
Tags
author

Davide Lanza davide.lanza@eikonproject.org

Return values
array<string|int, mixed>

the metadata tree.

store()

Store the set→category→entity metadata tree of the category.

public store() : array<string|int, mixed>
Tags
author

Davide Lanza davide.lanza@eikonproject.org

Return values
array<string|int, mixed>

the set→category→entity metadata tree of the category.

_create_entity()

Create an entity of the class specified by $this->entity_class

private _create_entity(string $directory) : BaseEntity
Parameters
$directory : string

the path to the associated directory.

Tags
author

Davide Lanza davide.lanza@eikonproject.org

Return values
BaseEntity

an object of $this->entity_class extending BaseEntity.


        
On this page

Search results