phpDocumentor CCL
[ class tree: CCL ] [ index: CCL ] [ all elements ]

Class: Entity

Source Location: /Entity.php

Class Entity

Descendants
Child Class Description
Unit Controller Unit. Controller adds logic to Entity and connects it with View

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Container

Container::$data

Inherited From Container

Container::__construct()
Constructs container and puts data inside
Container::current()
Returns current container element
Container::key()
Fetches current key from the container
Container::key_exists()
Checks if key exists in container
Container::next()
Fetches next element from the container
Container::offsetExists()
Checks if any item is assigned to a key
Container::offsetGet()
Returns contained item by key or NULL on error
Container::offsetSet()
Sets a contained item value in array style
Container::offsetUnset()
Removes contained item by key
Container::rewind()
Sets iterator pointer to the beginning of the container
Container::serialize()
Serializes the container
Container::unserialize()
Unserializes container data
Container::valid()
Checks if iterator pointer points to a valid element (non-false)

[ Top ]
Property Summary
string   $col_prefix  
string   $name   Global entity name
mixed   $primary_key  
string   $table_name  
string   $table_prefix  

[ Top ]
Method Summary
Entity   __construct()   Entity constructor
Param   add()   Adds a new entry to the entity parameter list. After the parameter has been added, you will be able to access it by name in associative array style.
void   define()   Defines entity structure all at once
Param   get_primary_key()   Fetches Param used as primary key for the entity

[ Top ]
Properties
string   $col_prefix = '' [line 34]
API Tags:
Access:  public


[ Top ]
string   $name [line 22]

Global entity name

API Tags:
Access:  public


[ Top ]
mixed   $primary_key = 'id' [line 17]
API Tags:
Access:  public


[ Top ]
string   $table_name = '' [line 30]
API Tags:
Access:  public


[ Top ]
string   $table_prefix = '' [line 26]
API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 44]

  Entity __construct( string $name, [string $table_prefix = ''], [string $col_prefix = ''], [array $params = NULL], [string $primary_key = 'id']  )

Entity constructor

Parameters:
string   $name:  Entity name
string   $table_prefix:  Table prefix, e.g. 'cot_'
string   $col_prefix:  SQL column prefix
array   $params:  Table parameters
string   $primary_key:  Primary key field(s)

API Tags:
Access:  public


Redefinition of:
Container::__construct()
Constructs container and puts data inside

Redefined in descendants as:

[ Top ]
add  [line 65]

  Param add( Param $param  )

Adds a new entry to the entity parameter list. After the parameter has been added, you will be able to access it by name in associative array style.

Parameters:
Param   $param:  Parameter object to be added (can be Param, Ref or Dict)

API Tags:
Return:  Reference to the added parameter
See:  Param, Reference, Dict
Access:  public


Redefined in descendants as:

[ Top ]
define  [line 82]

  void define( array $params, [mixed $primary_key = 'id']  )

Defines entity structure all at once

Parameters:
array   $params:  Array of Param
mixed   $primary_key:  Primary key name(s)

API Tags:
See:  Entity::add()
Access:  public


[ Top ]
get_primary_key  [line 95]

  Param get_primary_key( )

Fetches Param used as primary key for the entity


API Tags:
Return:  Primary key parameter
Access:  public


[ Top ]

Documentation generated on Thu, 09 Jul 2009 14:11:33 +0400 by phpDocumentor 1.4.1