XOOPS  2.6.0
Xoops\Core\Kernel\Model\Write Class Reference
Inheritance diagram for Xoops\Core\Kernel\Model\Write:
Inheritance graph

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from Xoops\Core\Kernel\XoopsModelAbstract
 $handler
 

Detailed Description

Definition at line 31 of file Write.php.

Member Function Documentation

Xoops\Core\Kernel\Model\Write::cleanVars ( XoopsObject $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
XoopsObject&$objectXoopsObject reference to object
Returns
bool true if successful public

Definition at line 45 of file Write.php.

References Xoops\Core\Kernel\Dtype\cleanVar(), Xoops\Core\Kernel\XoopsObject\cleanVars(), Xoops\Core\Kernel\XoopsObject\getErrors(), Xoops\Core\Kernel\XoopsObject\getVars(), and Xoops\Core\Kernel\XoopsObject\unsetDirty().

Referenced by Xoops\Core\Kernel\Model\Write\insert().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Kernel\Model\Write::delete ( XoopsObject $object,
  $force = false 
)

delete an object from the database

Parameters
XoopsObject&$objectXoopsObject reference to the object to delete
bool$forceforce to delete
Returns
bool FALSE if failed.

Definition at line 132 of file Write.php.

References $i, $result, and Xoops\Core\Kernel\XoopsObject\getVar().

Here is the call graph for this function:

Xoops\Core\Kernel\Model\Write::deleteAll ( CriteriaElement  $criteria = null,
  $force = false,
  $asObject = false 
)

delete all objects matching the conditions

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

Definition at line 185 of file Write.php.

References $criteria.

Xoops\Core\Kernel\Model\Write::insert ( XoopsObject $object,
  $force = true 
)

insert an object into the database

Parameters
XoopsObject&$objectXoopsObject reference to object
bool$forceflag to force the query execution despite security settings
Returns
mixed object ID

Definition at line 69 of file Write.php.

References $result, Xoops\Core\Kernel\XoopsObject\assignVar(), Xoops\Core\Kernel\Model\Write\cleanVars(), Xoops\Core\Kernel\XoopsObject\cleanVars(), Xoops\Core\Kernel\XoopsObject\getHtmlErrors(), Xoops\Core\Kernel\XoopsObject\getVar(), Xoops\Core\Kernel\XoopsObject\isDirty(), Xoops\Core\Kernel\XoopsObject\isNew(), and Xoops\Core\Kernel\XoopsObject\unsetNew().

Here is the call graph for this function:

Xoops\Core\Kernel\Model\Write::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 | null$criteriaCriteriaElement
bool$forceforce to query
Returns
bool

Definition at line 215 of file Write.php.

References $criteria.


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