class Daz_Config {
private static $instance;
private function __construct(){
$this->load();
}
private function load() {
...
}
public function get($key) {
...
}
public static getInstance(){
if (!self::$instance) self::$instance = new Daz_Config();
Hi,
I have just installed PHP and Oracle 11.2 on a new server but I get an
error message when I try to run php from the command line saying "This
application has failed to start because OCI.dll was not found". I have
checked that the ORACLE_HOME environment variable is set correctly and
have includ
One way to do it would be to use getter functions in your interface
that return the value of the constant (or a member variable) in your
implemented class. For example:
interface SetKillSwitch {
public function getKillSwitchNotes();
}
Then in your class implement your getKillSwitchNotes fu
Do you have a method in your Database class called affected_rows() ?
>From the code you have shown you only have a member variable called
affected_rows and so your call $db->fetch_array($result) is falling
over.
On Thu, Jan 7, 2010 at 8:47 AM, Allen McCabe wrote:
> I have a singleton database obj
> Oh and if one class uses methods in another class do I instansiate a
> new object of the other class I have seen use of OtherClass::Method
> is this better method of $obj = new OtherClass() use
The :: is used to access static methods of a class. Static methods can
be used withou
Hi,
I am having problems using any of the ZipArchive functions for files
above a certain size. For example creating a new zip and adding 1 file
works fine for files that are only a few kb, but when I tried a
slightly large one (about 60k) the zip became corrupt. Here is the
code im using:
$zip = n
Hi,
I am trying to add a prefix to all of the entries in a zip file using
the ZipArchive::renameIndex function which is corrupting the files
when I try to extract them. I was wondering if anyone else has used
this method successfully? Here is the code im using:
$client='TEST';
$zip = new ZipArchiv
You are right, when doing unit tests you only want to test the functionality
of the current class and so if there are errors its easier to track down
which class is causing the problem.
I personally use an api called SimpleTest for my php testing and what you
can do with this is create Mock object
8 matches
Mail list logo