Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401]

Active Record implementation. Superset of Zend Framework's.

Copyright: 2000-2013 John Lim
Copyright: 2014 Damien Regad, Mark Newnham and the ADOdb community
License: BSD-3-Clause
License: LGPL-2.1-or-later
File Size: 1489 lines (39 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 lib/adodb/adodb-active-record.inc.php
 lib/adodb/adodb-csvlib.inc.php

Defines 3 classes

ADODB_Active_DB:: (0 methods):

ADODB_Active_Table:: (2 methods):
  updateColsCount()
  ADODB_SetDatabaseAdapter()

ADODB_Active_Record:: (34 methods):
  UseDefaultValues()
  SetDatabaseAdapter()
  __set()
  __construct()
  __wakeup()
  _pluralize()
  _singularize()
  hasMany()
  belongsTo()
  __get()
  LoadRelations()
  UpdateActiveTable()
  GetPrimaryKeys()
  Error()
  ErrorMsg()
  ErrorNo()
  DB()
  TableInfo()
  Reload()
  Set()
  LastInsertID()
  doquote()
  GenWhere()
  Load()
  Save()
  Dirty()
  Insert()
  Delete()
  Find()
  packageFind()
  Replace()
  Update()
  GetAttributeNames()
  adodb_GetActiveRecordsClass()


Class: ADODB_Active_DB  - X-Ref

Class: ADODB_Active_Table  - X-Ref

updateColsCount()   X-Ref
No description

ADODB_SetDatabaseAdapter(&$db)   X-Ref
No description

Class: ADODB_Active_Record  - X-Ref

UseDefaultValues($bool=null)   X-Ref
No description

SetDatabaseAdapter(&$db)   X-Ref
No description

__set($name, $value)   X-Ref
No description

__construct($table = false, $pkeyarr=false, $db=false, $options=array()   X-Ref
No description

__wakeup()   X-Ref
No description

_pluralize($table)   X-Ref
No description

_singularize($table)   X-Ref
No description

hasMany($foreignRef,$foreignKey=false)   X-Ref
No description

belongsTo($foreignRef,$foreignKey=false)   X-Ref
ar->foreignName will contain the name of the tables associated with this table because
this table's rows may also be referenced by those tables using thistable_id or the provided
foreign keys (this index name is stored in ar->foreignKey)

this-table.other-table_id = other-table.id

__get($name)   X-Ref
__get Access properties - used for lazy loading

param: mixed $name
return: void

LoadRelations($name, $whereOrderBy, $offset=-1, $limit=-1)   X-Ref
No description

UpdateActiveTable($pkeys=false,$forceUpdate=false)   X-Ref
No description

GetPrimaryKeys(&$db, $table)   X-Ref
No description

Error($err,$fn)   X-Ref
No description

ErrorMsg()   X-Ref
No description

ErrorNo()   X-Ref
No description

DB()   X-Ref
No description

TableInfo()   X-Ref
No description

Reload()   X-Ref
No description

Set(&$row)   X-Ref
No description

LastInsertID(&$db,$fieldname)   X-Ref
No description

doquote(&$db, $val,$t)   X-Ref
No description

GenWhere(&$db, &$table)   X-Ref
No description

Load($where=null,$bindarr=false)   X-Ref
No description

Save()   X-Ref
No description

Dirty()   X-Ref
No description

Insert()   X-Ref
No description

Delete()   X-Ref
No description

Find($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array()   X-Ref
No description

packageFind($whereOrderBy,$bindarr=false,$pkeysArr=false,$extra=array()   X-Ref
No description

Replace()   X-Ref
No description

Update()   X-Ref
No description

GetAttributeNames()   X-Ref
No description

adodb_GetActiveRecordsClass(&$db, $class, $tableObj,$whereOrderBy,$bindarr, $primkeyArr,$extra, $relations)   X-Ref
No description