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

Public Member Functions

 cleanVars (&$object)
 
 insert (&$object, $force=true)
 
 delete (&$object, $force=false)
 
 deleteAll (CriteriaElement $criteria=null, $force=true, $asObject=false)
 
 updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria=null, $force=false)
 
- Public Member Functions inherited from XoopsModelAbstract
 __construct ($args=null, $handler=null)
 
 setHandler ($handler)
 
 setVars ($args)
 

Additional Inherited Members

- Data Fields inherited from XoopsModelAbstract
 $handler
 

Detailed Description

Member Function Documentation

◆ cleanVars()

cleanVars ( $object)

Clean values of all variables of the object for storage. also add slashes and quote string wherever needed

CleanVars only contains changed and cleaned variables Reference is used for PHP4 compliance

Parameters
$object
Returns
bool true if successful @access public
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete()

delete ( $object,
  $force = false 
)

delete an object from the database

Parameters
object$objectXoopsObject reference to the object to delete
bool$force
Returns
bool FALSE if failed.

◆ deleteAll()

deleteAll ( CriteriaElement  $criteria = null,
  $force = true,
  $asObject = false 
)

delete all objects matching the conditions

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement with conditions to meet
bool$forceforce to delete
bool$asObjectdelete in object way: instantiate all objects and delete one by one
Returns
bool|int

◆ insert()

insert ( $object,
  $force = true 
)

insert an object into the database

Parameters
object$objectXoopsObject reference to object
bool$forceflag to force the query execution despite security settings
Returns
mixed object ID
Here is the call graph for this function:

◆ updateAll()

updateAll (   $fieldname,
  $fieldvalue,
CriteriaElement  $criteria = null,
  $force = false 
)

Change a field for objects with a certain criteria

Parameters
string$fieldnameName of the field
mixed$fieldvalueValue to write
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
bool$forceforce to query
Returns
bool

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