Drest\Mapping\Driver\AbstractDriver::__construct PHP Method

__construct() public method

public __construct ( $paths = [] )
    public function __construct($paths = [])
    {
        $this->paths = (array) $paths;
    }

Usage Example

Beispiel #1
0
 public function __construct($paths)
 {
     parent::__construct($paths);
     $filename = self::$configuration_filepath . DIRECTORY_SEPARATOR . self::$configuration_filename;
     $file_parts = pathinfo($filename);
     if ($file_parts['extension'] == 'php') {
         if (!file_exists($filename)) {
             throw new \RuntimeException('The configuration file does not exist at this path: ' . $filename);
         }
         $resources = (include $filename);
         if (!is_array($resources)) {
             throw new \RuntimeException('The configuration file does not return the configuration: ' . $filename);
         }
         $this->classes = $resources;
     }
 }
All Usage Examples Of Drest\Mapping\Driver\AbstractDriver::__construct