Example #1
0
 /**
  *	Instantiate class
  *	@return object
  *	@param $storage string|object
  *	@param $args array
  **/
 function __construct($storage, array $args = NULL)
 {
     if (is_object($storage) && is_a($storage, 'DB\\Cursor')) {
         $ref = new ReflectionClass(get_class($storage));
         $this->storage = basename(dirname($ref->getfilename()));
         $this->mapper = $storage;
         unset($ref);
     } else {
         $this->storage = $storage;
     }
     $this->args = $args;
 }