void __construct(
array
&$xmlArr
)
|
|
Initialize BizDataObj with xml array
Parameters:
Redefinition of:
- MetaObject::__construct()
Redefined in descendants as:
Reset all rules (search, sort, other SQL rule)
API Tags:
void ClearOtherSQLRule(
)
|
|
Clear other SQL rule.
Reset the other SQL rule to default other SQL rule set in metadata
API Tags:
Clear search rule.
Reset the search rule to default search rule set in metadata
API Tags:
Clear sort rule.
Reset the sort rule to default sort rule set in metadata
API Tags:
Count the number of record according to the search results set before.
it ignores limit setting
API Tags:
| Return: | number of records |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
boolean DeleteRecord(
array
$recArr
)
|
|
Delete current record or delete the given input record
Parameters:
|
array |
$recArr: |
- associated array whose keys are field names of this BizDataObj |
API Tags:
| Return: | - if return false, the caller can call GetErrorMessage to get the error. |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
array DirectFetch(
[string
$searchRule = ""], [int
$count = -1], [int
$offset = 0]
)
|
|
Fetches SQL result rows as a sequential array without using query rules set before.
sample code: // fetch all record with firstname starting with Mike $do->DirectFetch("[FirstName] LIKE 'Mike%'"); // fetch first 10 records with firstname starting with Mike $do->DirectFetch("[FirstName] LIKE 'Mike%'", 10); // fetch 20th-30th records with firstname starting with Mike $do->DirectFetch("[FirstName] LIKE 'Mike%'", 10, 20);
Parameters:
|
string |
$searchRule: |
the search rule string |
|
int |
$count: |
number of records to return |
|
int |
$offset: |
the starting point of the return records |
API Tags:
| Return: | array of records |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
Fetches SQL result rows as a sequential array according the query rules set before.
sample code: $do->ResetRules(); $do->SetSearchRule($search_rule1); $do->SetSearchRule($search_rule2); $do->SetSortRule($sort_rule); $do->SetOtherRule($groupby); $total = $do->Count(); $do->SetLimit($count, $offset=0); $recordSet = $do->Fetch();
API Tags:
| Return: | array of records |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
Do the search query and return results set as PDOStatement
sample code: $do->ResetRules(); $do->SetSearchRule($search_rule1); $do->SetSearchRule($search_rule2); $do->SetSortRule($sort_rule); $do->SetOtherRule($groupby); $total = $do->Count(); $do->SetLimit($count, $offset=0); $resultSet = $do->Find(); $do->GetDBConnection()->setFetchMode(PDO::FETCH_ASSOC); while ($record = $resultSet->fetch()) { print_r($record); }
API Tags:
| Return: | PDO statement object |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
protected GetAssociation(
)
|
|
Get the Association
API Tags:
| Return: | m_Association |
| Access: | public |
Zend_DB_Adapter GetDBConnection(
)
|
|
Get database connection
API Tags:
string GetMessage(
$msgid, [array
$params = array()]
)
|
|
Get Message
Parameters:
|
|
$msgid: |
message Id |
|
array |
$params: |
|
API Tags:
string GetParameter(
string
$paramName
)
|
|
Get obejct parameter value
Parameters:
|
string |
$paramName: |
name of the parameter |
API Tags:
| Return: | parameter value |
| Access: | public |
string GetProperty(
string
$propertyName
)
|
|
Get the property of the object. Used in expression language
Parameters:
|
string |
$propertyName: |
name of the property |
API Tags:
| Return: | property value |
| Access: | public |
Redefinition of:
- MetaObject::GetProperty()
- Get property
Get the object instance defined in the object reference
Parameters:
|
string |
$objName: |
the object name list in the ObjectReference part |
API Tags:
| Return: | object instance |
| Access: | public |
Get session variables
Parameters:
API Tags:
Redefined in descendants as:
Inherit from parent object. Name, Package, Class cannot be inherited
API Tags:
boolean InsertRecord(
array
$recArr
)
|
|
Insert record using given input record array
Parameters:
|
array |
$recArr: |
- associated array whose keys are field names of this BizDataObj |
API Tags:
| Return: | - if return false, the caller can call GetErrorMessage to get the error. |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
Create an new (empty) record
API Tags:
| Return: | - empty record array with default values |
| Access: | public |
| Abstract: | |
Redefined in descendants as:
void ReadMetadata(
array
&$xmlArr
)
|
|
Read Metadata from xml array
Parameters:
API Tags:
Set the association of the object
Parameters:
API Tags:
void SetLimit(
int
$count, [int
$offset = 0]
)
|
|
Set limit of the query.
Parameters:
|
int |
$count: |
the number of records to return |
|
int |
$offset: |
the starting position of the result records |
API Tags:
void SetOtherSQLRule(
string
$rule
)
|
|
Set other SQL rule, append extra SQL statment in sql. i.e. GROUP BY [fieldName]
Parameters:
|
string |
$rule: |
search rule with SQL format "GROUP BY [fieldName] HAVING ..." |
API Tags:
void SetQueryParam(
string
$queryStr, array
$paramValues
)
|
|
Set query parameter for parameter binding in the query
Parameters:
|
string |
$queryStr: |
|
|
array |
$paramValues: |
|
API Tags:
void SetSearchRule(
string
$rule, [boolean
$overwrite = false]
)
|
|
Set search rule as text in sql where clause. i.e. [fieldName] opr Value
Parameters:
|
string |
$rule: |
search rule has format "[fieldName] opr Value" |
|
boolean |
$overwrite: |
specify if this rule should overwrite any existing rule |
API Tags:
Set session variables
Parameters:
API Tags:
Redefined in descendants as:
void SetSortRule(
string
$rule
)
|
|
Set search rule as text in sql order by clause. i.e. [fieldName] DESC|ASC
Parameters:
|
string |
$rule: |
sort rule has format "[fieldName] DESC|ASC" |
API Tags:
boolean UpdateRecord(
array
$recArr, [array
$oldRec = null]
)
|
|
Update record using given input record array
Parameters:
|
array |
$recArr: |
- associated array whose keys are field names of this BizDataObj |
|
array |
$oldRec: |
- associated array who is the old record field name / value pairs |
API Tags:
| Return: | - if return false, the caller can call GetErrorMessage to get the error. |
| Access: | public |
| Abstract: | |
Redefined in descendants as: