Symfony\Component\Routing\Loader\FileLoader::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string | array $paths = [] )
$paths string | array A path or an array of paths where to look for resources
    public function __construct($paths = array())
    {
        if (!is_array($paths)) {
            $paths = array($paths);
        }
        $this->paths = $paths;
    }

Usage Example

コード例 #1
0
 /**
  * Constructor.
  *
  * @param string|array $paths A path or an array of paths where to look for resources
  */
 public function __construct(AnnotationClassLoader $loader, $paths = array())
 {
     if (!function_exists('token_get_all')) {
         throw new \RuntimeException('The Tokenizer extension is needed for the routing annotation loaders.');
     }
     parent::__construct($paths);
     $this->loader = $loader;
 }