Standards  1.0
Entity Class Reference
Inheritance diagram for Entity:

Public Member Functions

 builtTemplate ()
 
 __construct ($data=false, $table=false, $location=false, $path=false, $id=false)
 
 getPath ()
 
 save ($force=false)
 
 view (Injections $overrideInjections=null, $level=1)
 
 get (Injections $overrideInjections=null, $level=1)
 

Data Fields

 $type
 
 $short
 
 $standard
 
 $level
 

Static Public Attributes

static $template = []
 

Protected Member Functions

 init ()
 

Protected Attributes

 $_data
 
 $_location
 
 $_table
 
 $_is_anonymous = true
 
 $_id
 
 $_path
 

Detailed Description

Events:

  • "inject"(Injections $inject(The view injections)): Use this to inject into the entity view.

Constructor & Destructor Documentation

__construct (   $data = false,
  $table = false,
  $location = false,
  $path = false,
  $id = false 
)
final

Override Entity::init() if you wish to use the constructor.

Member Function Documentation

builtTemplate ( )

Override this to set the object values.

You can use $this.

get ( Injections  $overrideInjections = null,
  $level = 1 
)

Get this entity's html.

Parameters
Injections$overrideInjectionsSet this to an injections instance if you wish to inject things into the view.
Returns
A string containing the entity display.
init ( )
protected

This is called after the constructor. You can override this.

save (   $force = false)

This will save the contents of the entity to its location in the database.

Parameters
bool$forceIf all values(including unchanged) of the entity should be updated in the database.
view ( Injections  $overrideInjections = null,
  $level = 1 
)

This will get a view instance for this entity.

Returns
A view instance for this entity.

Field Documentation

$_data
protected

The current raw entity data taken from the database.

$_id
protected

The table index that this entity is stored at.

$_is_anonymous = true
protected

If this entity has no database location yet.

$_location
protected

The standard query used to find this entity.

$_path
protected

The smallest link to this entity;

$_table
protected

The table this entity is stored in.

$level

The level this entity follows. Do not change this.

$short

The short link path. Do not change this.

$standard

The standard this entity is following. Do not change this.

$template = []
static

Override this.

This is the raw data template.

It is used by the entity when creating new default entities. Example:

static public $template = [ "id" => -1, "name" => "Default name", "body" => "Put body text here" ];
$type

The type of entity this is. Do not change this.


The documentation for this class was generated from the following file: