Sets all instance properties from given path

@param string $path
342688
public function setFileInfoFromPath($path)
    {
        $info = pathinfo($path);
        $this->dirname = array_key_exists('dirname', $info) ? $info['dirname'] : null;
        $this->basename = array_key_exists('basename', $info) ? $info['basename'] : null;
        $this->extension = array_key_exists('extension', $info) ? $info['extension'] : null;
        $this->filename = array_key_exists('filename', $info) ? $info['filename'] : null;

        if (file_exists($path) && is_file($path)) {
            $this->mime = MimeType::getMimeTypeByFile($path);
        }

        return $this;
    }
144394
private function setPath($path)
    {
        $this->path =  preg_replace_callback(
            '/(?:[^' . self::$charList . ':@\/%]+|%(?![A-Fa-f0-9]{2}))/',
            [$this, 'encode'],
            $path
        );

        return $this;
    }
353690
public function setPath(string $path): self
    {
        $realpath = realpath($path);
        if ($path && $path === $realpath) {
            $this->path = $path . DIRECTORY_SEPARATOR;
        }

        return $this;
    }
644826
public function setBasePath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(
                'Path must be a string'
            );
        }

        // Can not be empty
        if ($path == '') {
            throw new InvalidArgumentException(
                'Path can not be empty'
            );
        }

        $this->basePath = $path;
        return $this;
    }
329515
protected function setMagicEnv(/*# string */ $path)
    {
        $real = realpath($path);
        putenv('__DIR__=' . dirname($real));
        putenv('__FILE__=' . basename($real));
    }
433190
public function setPath(?string $path): Configuration
    {
        $this->path = realpath($path) ?: $path;

        return $this;
    }
263320
public function setPath($path)
    {
        $uri = $this->guzzleRequest->getUri()->withPath($path);
        $this->guzzleRequest = new Request($this->guzzleRequest->getMethod(), $uri);
    }
112015
private function setSchemaFromPath($path)
    {
        if (!file_exists($path)) {
            throw new Exception("Arquivo json não encontrado em diretório [{ $path }] fornecido", 400);
        }

        if (!isset(self::$schema)) {
            self::$schema = Schema::make(file_get_contents($path));
        }
    }
235743
public function setDictionaryPath(string $path): void
    {
        $this->customDictPath = $path;
        $this->supportedLanguages = null; // Clear cache because $path can contain new languages
    }
1133176
public function setPath($path = '')
    {
        $userFolder = Str::normalizePath(config('cripfilesys.user_folder'));

        if ($userFolder !== '' && !starts_with($path, $userFolder)) {
            $path = empty($path) ? '' : $path;
            $path = $this->prefixPath($path, $userFolder);
        }

        $this->path = Str::normalizePath($path);

        return $this;
    }
378934
protected function setPropertyByPath($path, $value)
    {
        $path = explode('.', $path);
        $root = $path[0];
        unset($path[0]);

        $array = ($this->hasProperty($root) ? $this->getProperty($root) : []);
        $pointer = &$array;

        // Loop through the array path and set array parts
        foreach ($path as $part) {
            if (!isset($pointer[$part])) {
                $pointer[$part] = [];
            }

            if (!is_array($pointer[$part])) {
                $pointer[$part] = [];
            }

            $pointer = &$pointer[$part];
        }

        $pointer = $value;
        unset($pointer);

        $this->setProperty($root, $array);
    }
486640
public function setException($path) {
        $pathException = (!is_array($path)) ? array($path) : $path;
        $this->exceptions = array_merge($this->exceptions, $pathException);
    }
1287354
public function setPath($path)
    {
        if (!$this->databaseIsPath) {
            $path = ltrim($path, '/');
        }
        $this->setDatabase($path);
    }
675093
public function copyTo($path)
    {
        foreach ($this->assets as $assetName => $assetPath) {
            $outputPath = $path . '/' . $assetName;

            $this->copyFromTo($assetPath, $outputPath);
        }
    }
1356468
public function setBasePath($path)
    {
        foreach ($this->loaders as $loader) {
            if ($loader instanceof FileLoaderInterface) {
                $loader->setBasePath($path);
            }
        }
    }
412009
public function setCachePath($path = null)
    {
        if (is_null($path)) {
            $this->path = __DIR__;
        } else {
            $this->path = filter_var($path, FILTER_SANITIZE_STRING);
        }
    }
997119
public function setPath(Path $path = null)
    {
        if (!empty($this->path)) {
            $this->path->removeStep($this);
        }

        $this->path = $path;

        if (!empty($path)) {
            $path->addStep($this);
        }

        return $this;
    }