Pagekit\Finder\Event\FileAccessEvent::path PHP Метод

path() публичный Метод

You can use patterns (delimited with / sign) or simple strings. $event->path('some/special/dir', 'w') $event->path('/some\/special\/dir/', 'w') // same as above
public path ( string $pattern, string $mode = 'r' )
$pattern string A pattern (a regexp or a string)
$mode string ('r', 'read', 'w', 'write', '-', 'deny'
    public function path($pattern, $mode = 'r')
    {
        switch ($mode) {
            case 'r':
            case 'read':
                $this->readPaths[] = $this->toRegex($pattern);
                break;
            case 'w':
            case 'write':
                $this->writePaths[] = $this->toRegex($pattern);
                break;
            case '-':
            case 'deny':
                $this->notPaths[] = $this->toRegex($pattern);
                break;
        }
        return $this;
    }