Redaxscript\Detector\DetectorAbstract::_detect PHP Метод

_detect() защищенный Метод

detect the required asset
С версии: 2.0.0
protected _detect ( array $setupArray = [], string $type = null, string $path = null )
$setupArray array array of detector setup
$type string type of the asset
$path string path to the required file
    protected function _detect($setupArray = [], $type = null, $path = null)
    {
        foreach ($setupArray as $key => $value) {
            $file = str_replace($this->_filePlaceholder, $value, $path);
            /* file exists */
            if (file_exists($file)) {
                $this->_output = $value;
                /* store query to session */
                if ($key === 'query') {
                    $this->_request->setSession($type, $value);
                }
                break;
            }
        }
    }