OPEN SOURCE SOCIAL NETWORK 6.6
Loading...
Searching...
No Matches
OssnEntities Class Reference
Inheritance diagram for OssnEntities:
OssnDatabase OssnBase OssnSession OssnAnnotation OssnBlock OssnFile OssnMessages OssnObject OssnUser MessageTyping OssnComments OssnPhotos OssnChat OssnAds OssnAlbums OssnGroup OssnSitePages OssnWall

Public Member Functions

 add ()
 
 get_entity ()
 
 save ()
 
 get_entities ()
 
 AddedEntityGuid ()
 
 updateEntity ()
 
 deleteByOwnerGuid ($guid, $type)
 
 deleteEntity ($guid='')
 
 searchEntities (array $params=array())
 
 canChange ($user='')
 
 destruct ()
 
- Public Member Functions inherited from OssnDatabase
 __construct ()
 
 Connect ()
 
 insert ($params)
 
 statement ($query)
 
 execute ($values=array())
 
 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)
 
 clearVars ()
 
 __destruct ()
 
- Public Member Functions inherited from OssnBase
 getGUID ()
 
 getID ()
 
 getParam ($param)
 
 isParam ($param)
 
 __call ($method, $args)
 

Additional Inherited Members

- Static Public Member Functions inherited from OssnSession
static start ()
 
static assign ($name='', $value='')
 
static unassign ($name='')
 
static isSession ($name='')
 
static getSession ($name='')
 

Member Function Documentation

◆ add()

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

◆ AddedEntityGuid()

AddedEntityGuid ( )

Get newly added entity guid.

Returns
integer

◆ canChange()

canChange (   $user = '')

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

Parameters
object$userUser
Returns
boolean

Reimplemented in OssnAnnotation.

◆ deleteByOwnerGuid()

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

◆ deleteEntity()

deleteEntity (   $guid = '')

Delete entity.

Parameters
integer$guidEntity guid in database
Returns
boolean

◆ destruct()

destruct ( )

Manual self destruct

Returns
void

◆ get_entities()

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

◆ get_entity()

get_entity ( )

Get Entity.

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

Returns
object|false

◆ save()

save ( )

Update Entity in database.

Requires $object->data

Returns
boolean

Reimplemented in OssnAnnotation, OssnObject, OssnUser, and OssnMessages.

◆ searchEntities()

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;

◆ updateEntity()

updateEntity ( )

Update entity metadata only.

Returns
bool;

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