|
Step 3: Creating Data Access Methods
Abstract and backend independant methods go into the base driver class
Mopple_Driver in lib/Driver.php.
<?php class Mopple_Driver {
/** * Array holding the current MP3 list. Each array entry is a hash * describing a MP3. The array is indexed by the IDs. * * @var array $_mp3s */ var $_mp3s = array();
/** * Lists all MP3s. * * @return array Returns a list of all MP3s. */ function listMP3s() { return $this->_mp3s; }
/** * Retrieves the MP3s from the backend. * * @abstract * * @return boolean|PEAR_Error True on success, PEAR_Error on failure. */ function retrieve() { } ?>
|