phpDocumentor openbiz.bin.data
[ class tree: openbiz.bin.data ] [ index: openbiz.bin.data ] [ all elements ]

Class: DataRecord

Source Location: /data/DataRecord.php

Class DataRecord

Class Overview

DataRecord class is the wrapper class of record array.

It is recommmended to be used in data update and deletion.

Located in /data/DataRecord.php [line 26]



		
				Author(s):
		
  • Rocky Swen
API Tags:
Access:  public

Information Tags:
Copyright:  Copyright (c) 2007-2009

Properties

Methods

[ Top ]
Property Summary
mixed   $m_BizObj  
mixed   $m_var  
mixed   $m_var_old  

[ Top ]
Method Summary
void   __construct()   Initialize DataRecord with record array.
   current()   Return element at current pointer position
boolean   Delete()   Delete record. This function calls BizDataObj DeleteRecord method internally
   get()   Get item value of array
string   GetError()   Get error message
obejct   GetRefObject()   Get reference object with given object name
   key()   Return current key (i.e., pointer value)
   next()   Return element at current pointer and advance pointer
mixed   offsetExists()   Check is offset value (by key) exist?
   offsetGet()   Get value of offset (by key)
void   offsetSet()   Set value of offset by key
void   offsetUnset()   Unset element by key
void   rewind()   Rewind, Send pointer to start of list
boolean   Save()   Save record. This function calls BizDataObj UpdateRecord method internally
void   set()   Set item value of array
array   toArray()   Return record in array
boolean   valid()   Confirm that there is an element at the current pointer position
mixed   __get()   Get field value with property format $value = $obj->get($fieldName); => $value = $obj->fieldName;
avoid   __set()   Set field value with property format $obj->set($fieldName, $value); => $obj->fieldName = $value;

[ Top ]
Properties
mixed   $m_BizObj = null [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $m_var = array() [line 28]
API Tags:
Access:  protected


[ Top ]
mixed   $m_var_old = array() [line 29]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 41]

  void __construct( array $recArray, BizDataObj $bizObj  )

Initialize DataRecord with record array.

Creat a new record - new DataRecord(null, $bizobj) Get a current record - new DataRecord($recArr, $bizobj)

Parameters:
array   $recArray:  record array.
BizDataObj   $bizObj:  BizDataObj instance

API Tags:
Access:  public


[ Top ]
current  [line 94]

  current( )

Return element at current pointer position


API Tags:
Access:  public


[ Top ]
Delete  [line 227]

  boolean Delete( )

Delete record. This function calls BizDataObj DeleteRecord method internally


API Tags:
Return:  true for success
Access:  public


[ Top ]
get  [line 62]

  get( $key  )

Get item value of array

Parameters:
   $key: 

API Tags:
Access:  public


[ Top ]
GetError  [line 237]

  string GetError( )

Get error message


API Tags:
Return:  error message
Access:  public


[ Top ]
GetRefObject  [line 258]

  obejct GetRefObject( string $objName  )

Get reference object with given object name

Parameters:
string   $objName:  name of the object reference

API Tags:
Return:  the instance of reference object
Access:  public


[ Top ]
key  [line 105]

  key( )

Return current key (i.e., pointer value)


API Tags:
Access:  public


[ Top ]
next  [line 115]

  next( )

Return element at current pointer and advance pointer


API Tags:
Access:  public


[ Top ]
offsetExists  [line 138]

  mixed offsetExists( mixed $key  )

Check is offset value (by key) exist?

Parameters:
mixed   $key: 

API Tags:
Access:  public


[ Top ]
offsetGet  [line 149]

  offsetGet( $key  )

Get value of offset (by key)

Parameters:
   $key: 

API Tags:
Access:  public


[ Top ]
offsetSet  [line 160]

  void offsetSet( $key, $val  )

Set value of offset by key

Parameters:
   $key: 
   $val: 

API Tags:
Access:  public


[ Top ]
offsetUnset  [line 170]

  void offsetUnset( mixed $key  )

Unset element by key

Parameters:
mixed   $key:  key of element

API Tags:
Access:  public


[ Top ]
rewind  [line 84]

  void rewind( )

Rewind, Send pointer to start of list


API Tags:
Access:  public


[ Top ]
Save  [line 205]

  boolean Save( )

Save record. This function calls BizDataObj UpdateRecord method internally


API Tags:
Return:  true for success
Access:  public


[ Top ]
set  [line 73]

  void set( $key, $val  )

Set item value of array

Parameters:
   $key: 
   $val: 

API Tags:
Access:  public


[ Top ]
toArray  [line 247]

  array toArray( )

Return record in array


API Tags:
Return:  record array
Access:  public


[ Top ]
valid  [line 125]

  boolean valid( )

Confirm that there is an element at the current pointer position


API Tags:
Access:  public


[ Top ]
__get  [line 182]

  mixed __get( string $fieldName  )

Get field value with property format $value = $obj->get($fieldName); => $value = $obj->fieldName;

Parameters:
string   $fieldName:  name of a field

API Tags:
Return:  value of the field
Access:  public


[ Top ]
__set  [line 195]

  avoid __set( string $fieldName, mixed $value  )

Set field value with property format $obj->set($fieldName, $value); => $obj->fieldName = $value;

Parameters:
string   $fieldName:  name of a field
mixed   $value:  value of the field

API Tags:
Access:  public


[ Top ]

Documentation generated on Tue, 22 Dec 2009 03:02:45 -0800 by phpDocumentor 1.3.0RC3