Kirby\Patterns\Lab::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        $this->kirby = kirby();
        $this->path = $this->kirby->option('patterns.path', 'patterns');
        $this->title = $this->kirby->option('patterns.title', 'Patterns');
        $this->root = $this->kirby->option('patterns.directory', $this->kirby->roots()->site() . DS . 'patterns');
        $lab = $this;
        // inject the patterns routes
        kirby()->routes([['pattern' => $this->path . '/(:all?)', 'action' => function ($path = null) use($lab) {
            return $lab->run($path);
        }]]);
        static::$instance = $this;
    }