Example #1
0
 /**
  * Allow path to be set through constructor.
  *
  * @param string|array $path
  */
 public function __construct($path)
 {
     if (!is_array($path)) {
         $path = ['directory' => (string) $path];
     }
     parent::__construct($path);
 }
Example #2
0
 /**
  * Set a repository object.
  *
  * @param \Titon\Db\Repository $repository
  * @param array $config
  */
 public function __construct(Repository $repository, array $config = [])
 {
     parent::__construct($config);
     $this->setRepository($repository);
 }