XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsModelWrite Class Reference
Inheritance diagram for XoopsModelWrite:
Inheritance graph

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from XoopsModelAbstract
 $handler
 

Detailed Description

Object write handler class.

Author
Taiwen Jiang phppp.nosp@m.@use.nosp@m.rs.so.nosp@m.urce.nosp@m.forge.nosp@m..net
Simon Roberts simon.nosp@m.@xoo.nosp@m.ps.or.nosp@m.g

XoopsObjectAbstract

Definition at line 31 of file write.php.

Member Function Documentation

XoopsModelWrite::cleanVars ( $object)

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

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

Returns
bool true if successful public

Definition at line 43 of file write.php.

References $errors, $vars, _DBDATESTRING, _DBTIMESTAMPSTRING, _DBTIMESTRING, _XOBJ_ERR_REQUIRED, _XOBJ_ERR_SHORTERTHAN, MyTextSanitizer\getInstance(), XOBJ_DTYPE_ARRAY, XOBJ_DTYPE_DATE, XOBJ_DTYPE_DECIMAL, XOBJ_DTYPE_EMAIL, XOBJ_DTYPE_FLOAT, XOBJ_DTYPE_INT, XOBJ_DTYPE_LTIME, XOBJ_DTYPE_MTIME, XOBJ_DTYPE_OTHER, XOBJ_DTYPE_SOURCE, XOBJ_DTYPE_STIME, XOBJ_DTYPE_TIME, XOBJ_DTYPE_TIMESTAMP, XOBJ_DTYPE_TXTAREA, XOBJ_DTYPE_TXTBOX, XOBJ_DTYPE_UNICODE_ARRAY, XOBJ_DTYPE_UNICODE_EMAIL, XOBJ_DTYPE_UNICODE_OTHER, XOBJ_DTYPE_UNICODE_TXTAREA, XOBJ_DTYPE_UNICODE_TXTBOX, XOBJ_DTYPE_UNICODE_URL, XOBJ_DTYPE_URL, and xoops_convert_encode().

Here is the call graph for this function:

XoopsModelWrite::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.

Definition at line 320 of file write.php.

References $i, $result, and $sql.

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

delete all objects matching the conditions

Parameters
object$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 345 of file write.php.

References $criteria, $num, and $sql.

XoopsModelWrite::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

Definition at line 272 of file write.php.

References $result, and $sql.

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

Change a field for objects with a certain criteria

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

Definition at line 380 of file write.php.

References $criteria, $result, and $sql.


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