Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Joint
  • Read
  • Stats
  • Sync
  • Write
  • Overview
  • Namespace
  • Class
  • Tree

Class Write

Object write handler class.

Xoops\Core\Kernel\XoopsModelAbstract
Extended by Xoops\Core\Kernel\Model\Write
Namespace: Xoops\Core\Kernel\Model
Package: Xoops\Core\Kernel
Category: Xoops\Core\Kernel\Model\Write
Copyright: 2000-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Taiwen Jiang phppp@users.sourceforge.net
Author: Simon Roberts simon@xoops.org
Since: 2.3.0
Link: http://xoops.org
Located at oops_lib/Xoops/Core/Kernel/Model/Write.php
Methods summary
public boolean
# cleanVars( Xoops\Core\Kernel\XoopsObject $object )

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

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

Parameters

$object
object to act on

Returns

boolean
true if successful
public integer|false
# insert( Xoops\Core\Kernel\XoopsObject $object, boolean $force = true )

insert an object into the database

insert an object into the database

Parameters

$object
object to persist
$force
flag to force the query execution despite security settings

Returns

integer|false
id of insert, or false on error
public boolean
# delete( Xoops\Core\Kernel\XoopsObject $object, boolean $force = false )

delete an object from the database

delete an object from the database

Parameters

$object
object to delete
$force
force to delete

Returns

boolean
FALSE if failed.
public boolean
# deleteAll( Xoops\Core\Kernel\CriteriaElement $criteria = null, boolean $force = false, boolean $asObject = false )

delete all objects matching the conditions

delete all objects matching the conditions

Parameters

$criteria
criteria to match
$force
force to delete
$asObject
delete as objects: instantiate all objects and delete one by one

Returns

boolean
public boolean
# updateAll( string $fieldName, mixed $fieldValue, Xoops\Core\Kernel\CriteriaElement $criteria = null, boolean $force = false )

Change a field for objects with a certain criteria

Change a field for objects with a certain criteria

Parameters

$fieldName
Name of the field
$fieldValue
Value to write
$criteria
criteria to match
$force
force to query

Returns

boolean
Methods inherited from Xoops\Core\Kernel\XoopsModelAbstract
setHandler(), setVars()
Properties inherited from Xoops\Core\Kernel\XoopsModelAbstract
$handler
API documentation generated by ApiGen