Kahlan\Jit\Interceptor::loadFile PHP Метод

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

Loads a file.
public loadFile ( $filepath ) : boolean
Результат boolean Returns `true` if loaded, null otherwise.
    public function loadFile($filepath)
    {
        $file = realpath($filepath);
        if ($file === false) {
            throw new JitException("Error, the file `'{$filepath}'` doesn't exist.");
        }
        if ($cached = $this->cached($file)) {
            require $cached;
            return true;
        }
        $code = file_get_contents($file);
        $timestamp = filemtime($file);
        $rewrited = $this->_patchers->process($code, $file);
        $cached = $this->cache($file, $rewrited, max($timestamp, $this->_watchedTimestamp) + 1);
        require $cached;
        return true;
    }