コード例 #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);
 }
コード例 #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);
 }