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

Class: Instance

Source Location: /Instance.php

Class Instance

Class Overview

Instance of entity as data entry

Located in /Instance.php [line 13]



		
		
		
		

Properties

Methods

[ Top ]
Descendants
Child Class Description
Item Controller item class. Controller Units operate on Items

[ Top ]
Property Summary
array   $data  
Entity   $entity  

[ Top ]
Method Summary
Instance   __construct()   Creates object from SQL result row or array of parameter values or blank to be filled later.
bool   delete()   Removes object instance from the database
bool   exists()   Checks whether instance exists in database
mixed   get_key()  
mixed   save()   Saves unit object in database. Performs UPDATE if object ID is set or INSERT otherwise.
mixed   __get()   Returns property value
bool   __isset()   Checks for property
void   __set()   Sets property value
void   __unset()   Unsets property value

[ Top ]
Properties
array   $data = array() [line 21]
API Tags:
Access:  protected


[ Top ]
Entity   $entity [line 17]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 30]

  Instance __construct( Entity $entity, [mixed $source = NULL]  )

Creates object from SQL result row or array of parameter values or blank to be filled later.

Parameters:
Entity   $entity:  Reference to parent entity
mixed   $source:  ID or query result row

API Tags:
Access:  public


Redefined in descendants as:
  • Item::__construct() : Instance constructor. Creates object from SQL result row, loads by ID or just leaves blank to be filled later.
  • Link::__construct() : Instance constructor. Creates object from SQL result row, loads by ID or just leaves blank to be filled later.

[ Top ]
delete  [line 139]

  bool delete( )

Removes object instance from the database


API Tags:
Return:  TRUE on success, FALSE on error
Access:  public


[ Top ]
exists  [line 44]

  bool exists( )

Checks whether instance exists in database


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
get_key  [line 55]

  mixed get_key( )


API Tags:
Return:  SQL primary key for WHERE
Access:  protected


Redefined in descendants as:

[ Top ]
save  [line 155]

  mixed save( )

Saves unit object in database. Performs UPDATE if object ID is set or INSERT otherwise.


API Tags:
Return:  FALSE on error, TRUE on successful update or ID on successful insert
Access:  public


[ Top ]
__get  [line 98]

  mixed __get( string $name  )

Returns property value

Parameters:
string   $name:  Property name

API Tags:
Return:  Property value
Access:  public


[ Top ]
__isset  [line 108]

  bool __isset( string $name  )

Checks for property

Parameters:
string   $name:  Property name

API Tags:
Return:  Whether field is set
Access:  public


[ Top ]
__set  [line 118]

  void __set( string $name, mixed $value  )

Sets property value

Parameters:
string   $name:  Property name
mixed   $value:  Property value

API Tags:
Access:  public


[ Top ]
__unset  [line 130]

  void __unset( string $name  )

Unsets property value

Parameters:
string   $name:  Property name

API Tags:
Access:  public


[ Top ]

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