Kahlan\Jit\Interceptor::__construct PHP Method

__construct() public method

Constructs
public __construct ( array $options = [] )
$options array Options for the constructor.
    public function __construct($options = [])
    {
        $defaults = ['originalLoader' => null, 'patchers' => null, 'exclude' => [], 'include' => ['*'], 'loadClass' => 'loadClass', 'findFile' => 'findFile', 'add' => 'add', 'addPsr4' => 'addPsr4', 'getPrefixes' => 'getPrefixes', 'getPrefixesPsr4' => 'getPrefixesPsr4', 'watch' => [], 'cachePath' => rtrim(sys_get_temp_dir(), DS) . DS . 'jit', 'clearCache' => false];
        $options += $defaults;
        $this->_originalLoader = $options['originalLoader'];
        $this->_patchers = new Patchers();
        $this->_loadClass = $options['loadClass'];
        $this->_findFile = $options['findFile'];
        $this->_add = $options['add'];
        $this->_addPsr4 = $options['addPsr4'];
        $this->_getPrefixes = $options['getPrefixes'];
        $this->_getPrefixesPsr4 = $options['getPrefixesPsr4'];
        $this->_cachePath = rtrim($options['cachePath'], DS);
        $this->_exclude = (array) $options['exclude'];
        $this->_exclude[] = 'jit\\';
        $this->_include = (array) $options['include'];
        if ($options['clearCache']) {
            $this->clearCache();
        }
        if ($options['watch']) {
            $this->watch($options['watch']);
        }
    }