API - XOOPS 2.5.11 Beta 2
By monxoops.fr
ProfileProfileHandler Class Reference
Inheritance diagram for ProfileProfileHandler:
Collaboration diagram for ProfileProfileHandler:

Public Member Functions

 __construct (XoopsDatabase $db)
 
 create ($isNew=true)
 
 get ($uid=null, $fields=null)
 
 createField ($isNew=true)
 
 loadFields ()
 
 getFields (CriteriaElement $criteria, $id_as_key=true, $as_object=true)
 
 insertField (ProfileField $field, $force=false)
 
 deleteField (ProfileField $field, $force=false)
 
 saveField ($vars, $weight=0)
 
 insert (XoopsObject $obj, $force=false)
 
 getUserVars ()
 
 search (CriteriaElement $criteria, $searchvars=array(), $groups=null)
 
- Public Member Functions inherited from XoopsPersistableObjectHandler
 __construct (XoopsDatabase $db=null, $table='', $className='', $keyName='', $identifierName='')
 
 XoopsPersistableObjectHandler (XoopsDatabase $db=null, $table='', $className='', $keyName='', $identifierName='')
 
 setHandler ($handler=null, $args=null, $path=null)
 
 loadHandler ($name, $args=null)
 
 __call ($name, $args)
 
 create ($isNew=true)
 
 get ($id=null, $fields=null)
 
 insert (XoopsObject $object, $force=true)
 
 delete (XoopsObject $object, $force=false)
 
 deleteAll (CriteriaElement $criteria=null, $force=true, $asObject=false)
 
 updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria=null, $force=false)
 
getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
getIds (CriteriaElement $criteria=null)
 
getByLimit ($limit=0, $start=0, CriteriaElement $criteria=null, $fields=null, $asObject=true)
 
 getCount (CriteriaElement $criteria=null)
 
 getCounts (CriteriaElement $criteria=null)
 
getByLink (CriteriaElement $criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null)
 
 getCountByLink (CriteriaElement $criteria=null)
 
 getCountsByLink (CriteriaElement $criteria=null)
 
 updateByLink ($data, CriteriaElement $criteria=null)
 
 deleteByLink (CriteriaElement $criteria=null)
 
 cleanOrphan ($table_link='', $field_link='', $field_object='')
 
 synchronization ()
 
 convertResultSet ($result, $id_as_key=false, $as_object=true)
 
- Public Member Functions inherited from XoopsObjectHandler
 __construct (XoopsDatabase $db)
 
 XoopsObjectHandler ($db)
 
 create ()
 
 get ($id)
 
 insert (XoopsObject $object)
 
 delete (XoopsObject $object)
 

Data Fields

 $_fHandler
 
 $_fields = array()
 
- Data Fields inherited from XoopsPersistableObjectHandler
 $handler
 
 $handlers = array('read' => null, 'stats' => null, 'joint' => null, 'write' => null, 'sync' => null)
 
 $table
 
 $keyName
 
 $className
 
 $identifierName
 
 $field_link
 
 $field_object
 
- Data Fields inherited from XoopsObjectHandler
 $db
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( XoopsDatabase  $db)
Parameters
null | XoopsDatabase$db

Reimplemented from XoopsObjectHandler.

Here is the call graph for this function:

Member Function Documentation

◆ create()

create (   $isNew = true)

create a new ProfileProfile

Parameters
bool$isNewFlag the new objects as "new"?
Returns
object ProfileProfile

Reimplemented from XoopsPersistableObjectHandler.

Here is the call graph for this function:

◆ createField()

createField (   $isNew = true)

Create new ProfileField object

Parameters
bool$isNew
Returns
ProfileField
Here is the caller graph for this function:

◆ deleteField()

deleteField ( ProfileField  $field,
  $force = false 
)

Delete a field from the database

Parameters
ProfileField$field
bool$force
Returns
bool

◆ get()

get (   $uid = null,
  $fields = null 
)

Get a ProfileProfile object for a user id.

We will create an empty profile if none exists. This behavior allows user objects created outside of profile to be edited correctly in the profile module.

Parameters
integer | null$uid
string[] | null$fieldsarray of field names to fetch, null for all
Returns
object ProfileProfile

Reimplemented from XoopsPersistableObjectHandler.

Here is the call graph for this function:

◆ getFields()

getFields ( CriteriaElement  $criteria,
  $id_as_key = true,
  $as_object = true 
)

Fetch fields

Parameters
CriteriaElement$criteriaCriteriaElement object
bool$id_as_keyreturn array with field IDs as key?
bool$as_objectreturn array of objects?
Returns
array

◆ getUserVars()

getUserVars ( )

Get array of standard variable names (user table)

Returns
array
Here is the caller graph for this function:

◆ insert()

insert ( XoopsObject  $obj,
  $force = false 
)

insert a new object in the database

Parameters
XoopsObject | ProfileProfile$objreference to the object
bool$forcewhether to force the query execution despite security settings
Returns
bool FALSE if failed, TRUE if already present and unchanged or successful

Reimplemented from XoopsPersistableObjectHandler.

Here is the call graph for this function:

◆ insertField()

insertField ( ProfileField  $field,
  $force = false 
)

Insert a field in the database

Parameters
ProfileField$field
bool$force
Returns
bool
Here is the caller graph for this function:

◆ loadFields()

loadFields ( )

Load field information

Returns
array
Here is the caller graph for this function:

◆ saveField()

saveField (   $vars,
  $weight = 0 
)

Save a new field in the database

Parameters
array$varsarray of variables, taken from $module->loadInfo('profile')['field']
int$weight
Here is the call graph for this function:

◆ search()

search ( CriteriaElement  $criteria,
  $searchvars = array(),
  $groups = null 
)

Search profiles and users

Parameters
CriteriaElement$criteriaCriteriaElement
array$searchvarsFields to be fetched
array$groupsfor Usergroups is selected (only admin!)
Returns
array
Here is the call graph for this function:

Field Documentation

◆ $_fHandler

$_fHandler

holds reference to profileFieldHandler object

◆ $_fields

$_fields = array()

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