Esempio n. 1
0
 /**
  * The constructor
  * @param string $dir The directory where the current addond is located 
  * @throws \InvalidArgumentException
  */
 public function __construct($dir)
 {
     if (!is_string($dir)) {
         throw new \InvalidArgumentException('');
     }
     parent::__construct($dir);
 }
Esempio n. 2
0
 /**
  * The constructor
  * 
  * @param string $dir The directory where the application is located 
  * @throws \InvalidArgumentException
  */
 public function __construct($dir)
 {
     if (!is_string($dir)) {
         throw new \InvalidArgumentException('The dir argument must be of type string');
     }
     $dir = realpath($dir);
     if ($dir === false) {
         throw new \InvalidArgumentException('The dir specified does not exist');
     }
     parent::__construct($dir);
 }