pass class variables/arguments
Posted: Fri Feb 19, 2010 10:22 am
I'm somewhat new to the OOP methodoligies.
I'm trying to create a custom oracle database class. The php/oracle functions are odd..
I'm trying to do something like:
I'm trying to create a custom oracle database class. The php/oracle functions are odd..
I'm trying to do something like:
I'm not sure how to pass those variables as arugments within the class. That's what seems logical to me, but there's probably a completely methodology of doing it.<?php
class db {
function connector() {
return $this->cisConnection = ocilogon("","","");
}
function parsed($cmdstr) {
$this->parsed = ociparse($this->connector(), $cmdstr);
}
function execute() {
ociexecute($this->parsed);
}
function nrows($cmdstr) {
$this->execute();
return ocifetchstatement($this->parsed, $results);
}
}