OssnAnnotation Class Reference
Inheritance diagram for OssnAnnotation:
OssnEntities OssnDatabase OssnBase

Public Member Functions

 initAttributes ()
 
 addAnnotation ()
 
 getAnnotationById ()
 
 getAnnotationsByType ()
 
 getAnnotationsByOwner ()
 
 annon_delete_by_subject ($subject, $type)
 
 getAnnotationBySubject ()
 
 deleteAnnotation ($annotation)
 
 deleteAnnotationByOwner ($ownerguid)
 
 getAnnotationId ()
 
 searchAnnotation (array $params=array())
 
 canChange ($user= '')
 
- Public Member Functions inherited from OssnEntities
 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 OssnAnnotation.php.

Member Function Documentation

addAnnotation ( )

Create annotation;

Requires : $object->(owner_guid, subject_guid, type, subtype, value)

Returns
boolean

Definition at line 37 of file OssnAnnotation.php.

annon_delete_by_subject (   $subject,
  $type 
)

Delete annotations by subject guid

$subject = subject_guid, $type = annotation type

Parameters
string$type
Returns
object;

Definition at line 145 of file OssnAnnotation.php.

canChange (   $user = '')

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

Parameters
object$userUser
Returns
boolean

Definition at line 382 of file OssnAnnotation.php.

deleteAnnotation (   $annotation)

Delete Annotation

Parameters
integer$annotationannotation_id
Returns
boolean;

Definition at line 199 of file OssnAnnotation.php.

deleteAnnotationByOwner (   $ownerguid)

Delete Annotation

Parameters
integer$annotationannotation_id
Returns
boolean

Definition at line 224 of file OssnAnnotation.php.

getAnnotationById ( )

Get annotation by annotation id;

Requires : $object->(annotation_id)

Returns
object

Definition at line 83 of file OssnAnnotation.php.

getAnnotationBySubject ( )

Get annotation by subject_guid;

Requires : $object->(subject_guid, types(optional))

Returns
object;

Definition at line 171 of file OssnAnnotation.php.

getAnnotationId ( )

Get newly create annoation id

Returns
integer

Definition at line 242 of file OssnAnnotation.php.

getAnnotationsByOwner ( )

Get annotations by owner

Requires : $this->owner_guid

Returns
object;

Definition at line 121 of file OssnAnnotation.php.

getAnnotationsByType ( )

Get annotations by annotation type

Requires: $object->(annotation_id)

Returns
object;

Definition at line 99 of file OssnAnnotation.php.

initAttributes ( )

Initialize the objects.

Returns
void

Definition at line 17 of file OssnAnnotation.php.

searchAnnotation ( array  $params = array())

Search annotation by its type, owner etc

Parameters
array$paramsA valid options in format:
string$params,['search_type']true(default) to performs matching on a per-character basis , false to performs matching on exact value.
string$params,['type']Valid annotation type
integer$params,['subject_guid']A valid subject guid, which results integer value
integer$params,['owner_guid']A valid owner guid, which results integer value
integer$params,['limit']Result limit default, Default is 20 values
string$params,['order_by']To show result in sepcific order. There is no default order.

reutrn array|false;

Definition at line 258 of file OssnAnnotation.php.


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