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 Joint

Object joint handler class.

Xoops\Core\Kernel\XoopsModelAbstract
Extended by Xoops\Core\Kernel\Model\Joint
Namespace: Xoops\Core\Kernel\Model
Package: Xoops\Core\Kernel
Category: Xoops\Core\Kernel\Model\Joint
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
Since:

2.3.0

Usage of methods provided by XoopsModelJoint:

Step #1: set linked table and joint fields through XoopsPersistableObjectHandler: $handler->table_link = $handler->db2->prefix("the_linked_table"); full name of the linked table that is used for the query $handler->field_link = "the_linked_field"; name of field in linked table that will be used to link the linked table with current table $handler->field_object = "the_object_field"; name of field in current table that will be used to link the linked table with current table; linked field name will be used if the field name is not set Step #2: fetch data


Link: http://xoops.org
Located at oops_lib/Xoops/Core/Kernel/Model/Joint.php
Methods summary
public false|array
# getByLink( Xoops\Core\Kernel\CriteriaElement $criteria = null, array $fields = null, boolean $asObject = true, string $field_link = null, string $field_object = null )

get a list of objects matching a condition joint with another related object

get a list of objects matching a condition joint with another related object

Parameters

$criteria
criteria to match
$fields
variables to fetch
$asObject
flag indicating as object, otherwise as array
$field_link

field of linked object for JOIN; deprecated, for backward compatibility only

$field_object

field of current object for JOIN; deprecated, for backward compatibility only

Returns

false|array
array as requested by $asObject
public false|integer
# getCountByLink( Xoops\Core\Kernel\CriteriaElement $criteria = null )

Count of objects matching a condition

Count of objects matching a condition

Parameters

$criteria
criteria to match

Returns

false|integer
count of objects
public false|integer
# getCountsByLink( Xoops\Core\Kernel\CriteriaElement $criteria = null )

array of count of objects matching a condition of, groupby linked object keyname

array of count of objects matching a condition of, groupby linked object keyname

Parameters

$criteria
criteria to match

Returns

false|integer
count of objects
public false|integer
# updateByLink( array $data, Xoops\Core\Kernel\CriteriaElement $criteria = null )

update objects matching a condition against linked objects

update objects matching a condition against linked objects

Parameters

$data
array of key => value
$criteria
criteria to match

Returns

false|integer
count of objects
public false|integer
# deleteByLink( Xoops\Core\Kernel\CriteriaElement $criteria = null )

Delete objects matching a condition against linked objects

Delete objects matching a condition against linked objects

Parameters

$criteria
criteria to match

Returns

false|integer
count of objects
Methods inherited from Xoops\Core\Kernel\XoopsModelAbstract
setHandler(), setVars()
Properties inherited from Xoops\Core\Kernel\XoopsModelAbstract
$handler
API documentation generated by ApiGen