Bolt\Stack::initialize PHP Method

initialize() private method

Initialize file list for current user, either from session or database.
private initialize ( )
    private function initialize()
    {
        if ($this->initialized) {
            return;
        }
        if ($this->session->isStarted() && $this->session->get('stack') !== null) {
            $paths = $this->session->get('stack');
            $this->files = $this->hydrateList($paths);
        } else {
            $paths = $this->users->getCurrentUser()['stack'];
            $this->files = $this->hydrateList($paths);
            $this->session->set('stack', $this->persistableList());
        }
        $this->initialized = true;
    }