function __construct($a = "database.db") { require_once 'workflows.php'; $w = new Workflows(); $this->cache = $w->cache(); $this->data = $w->data(); $this->bundle = $w->bundle(); $this->path = $w->path(); $this->home = $w->home(); if (file_exists($this->data . '/' . $a)) { $a = $this->data . '/' . $a; } elseif (file_exists($this->cache . '/' . $a)) { $a = $this->cache . '/' . $a; } elseif (file_exists($this->path . '/' . $a)) { $a = $this->path . '/' . $a; } elseif (file_exists($a)) { // do nothing. } else { $a = $this->data . '/' . $a; } $this->open($a); }