OssnEntities Class Reference
Inheritance diagram for OssnEntities:
OssnDatabase OssnBase OssnAnnotation OssnFile OssnObject OssnUser

Public Member Functions

 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid)
 
 searchEntities (array $params=array())
 
 canChange ($user= '')
 
- Public Member Functions inherited from OssnDatabase
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ()
 
 update ($params=array())
 
 select ($params, $multi= '')
 
 fetch ($data=false)
 
 delete ($params)
 
 getLastEntry ()
 
 constructWheres (array $array, $operator="AND")
 
 generateLimit ($data_limit=false, $page_limit=false, $offset=false)
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 

Detailed Description

Definition at line 11 of file OssnEntities.php.

Member Function Documentation

add ( )

Add new entity.

Requires object $this->type => entity type; (this usually is user, object, annotation, site) $this->subtype => entity subtype; $this->entity_permission => OSSN_ACCESS $this->active = is entity is active or not $this->value = data you want to insert $this->owner_guid = entity owner guid

Returns
boolean

Definition at line 77 of file OssnEntities.php.

AddedEntityGuid ( )

Get newly added entity guid.

Returns
integer

Definition at line 251 of file OssnEntities.php.

canChange (   $user = '')

Can change Check if user can change the requested item or not

Parameters
object$userUser
Returns
boolean

Definition at line 484 of file OssnEntities.php.

deleteByOwnerGuid (   $guid,
  $type 
)

Delete all entities related to owner guid.

Parameters
integer$guidEntity guid in database
string$typeEntity type
Todo:
why not there is subtype?
Returns
boolean

Definition at line 303 of file OssnEntities.php.

deleteEntity (   $guid)

Delete entity.

Parameters
integer$guidEntity guid in database
Returns
boolean

Definition at line 327 of file OssnEntities.php.

get_entities ( )

Get entities.

Requires object $this->type => entity type; $this->subtype => entity subtype; $this->owner_guid => guid of entity owner $this->order_by = to sort the data in a recordset

Returns
object

Definition at line 231 of file OssnEntities.php.

get_entity ( )

Get Entity.

Requires object $this->entity_guid Entity guid in database;

Returns
object|false

Definition at line 122 of file OssnEntities.php.

save ( )

Update Entity in database.

Requires $object->data

Returns
boolean

Definition at line 157 of file OssnEntities.php.

searchEntities ( array  $params = array())

Search entities

Parameters
array$paramsA valid options in format: 'search_type' => true(default) to performs matching on a per-character basis false for performs matching on exact value. 'subtype' => Valid entity subtype 'type' => Valid entity type 'value' => Value which you want to search 'owner_guid' => A valid owner guid, which results integer value 'limit' => Result limit default, Default is 20 values 'order_by' => To show result in sepcific order. There is no default order.

reutrn array|false;

Definition at line 382 of file OssnEntities.php.

updateEntity ( )

Update entity metadata only.

Returns
bool;

Definition at line 260 of file OssnEntities.php.


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