POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_Row_DAO

Source Location: /classes/OTS_Row_DAO.php

Class OTS_Row_DAO

Class Overview

Base class for all single-row classes.

Base class for all single-row classes. It implements auto-loading constructors. This class extends basic DAO class by initialising interface.

This class is mostly usefull when you create own extensions for POT code.

Located in /classes/OTS_Row_DAO.php [line 28]

OTS_Base_DAO
   |
   --OTS_Row_DAO
Author(s):
API Tags:
Abstract:  

Information Tags:
Version:  0.1.1
Since:  0.1.1

Methods

[ Top ]
Descendants
Child Class Description
OTS_Guild OTServ guild abstraction.
OTS_Group OTServ user group abstraction.
OTS_Player OTServ character abstraction.
OTS_Account OTServ account abstraction.
OTS_Ban OTServ ban generic class.
OTS_GuildRank OTServ guild rank abstraction.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From OTS_Base_DAO

OTS_Base_DAO::$db

Inherited From OTS_Base_DAO

OTS_Base_DAO::__construct()
Sets database connection handler.
OTS_Base_DAO::__clone()
Creates clone of object.
OTS_Base_DAO::__set_state()
Magic PHP5 method.
OTS_Base_DAO::__sleep()
Magic PHP5 method.
OTS_Base_DAO::__wakeup()
Magic PHP5 method.

[ Top ]
Method Summary
OTS_Row_DAO   __construct()   Handles automatic loading for record.
void   find()   Loads row by it's name.
void   load()   Loads row by it's ID.

[ Top ]
Methods
Constructor __construct  [line 43]

  OTS_Row_DAO __construct( [int|string|null $id = null]  )

Handles automatic loading for record.

Handles automatic loading for record. You can call class constructor with optional parameter which can be either of integer type (then it will be treated as primary key value) or string type (then it will be used as name identifier).

Note: Make sure that you pass $id argument of correct type. This method determinates action which should be taken based on variable type. It means that 1 is primary key value, but '1' is name value.

Parameters:
int|string|null   $id:  Row ID (or name identifier dependend on child class).

API Tags:
Access:  public

Information Tags:
Version:  0.1.1
Since:  0.1.1

Redefinition of:
OTS_Base_DAO::__construct()
Sets database connection handler.

[ Top ]
find  [line 74]

  void find( string $name  )

Loads row by it's name.

Loads row by it's name.

Parameters:
string   $name:  String identifier.

API Tags:
Abstract:  
Access:  public

Information Tags:
Version:  0.1.1
Since:  0.1.1

Redefined in descendants as:

[ Top ]
load  [line 67]

  void load( int $id  )

Loads row by it's ID.

Loads row by it's ID.

Parameters:
int   $id:  Integer identifier.

API Tags:
Abstract:  
Access:  public

Information Tags:
Version:  0.1.1
Since:  0.1.1

Redefined in descendants as:

[ Top ]