private function facade() { $facade = ucfirst($this->db) . ucfirst($this->table); $facade2 = false; if ($this->db == SITE_NAME) { $facade2 = ucfirst($this->table); } $class = '\\Keystore\\' . $facade; if (!class_exists($class)) { $code = 'namespace Keystore; class ' . $facade . ' extends Facade { public static $database = "' . $this->db . '"; public static $table = "' . $this->table . '"; }'; eval($code); Alias::facade('Dbk' . $facade, $facade, 'Keystore'); } if (false !== $facade2) { $class2 = '\\Keystore\\' . $facade2; if (!class_exists($class2)) { $code2 = 'namespace Keystore; class ' . $facade2 . ' extends Facade { public static $database = "' . $this->db . '"; public static $table = "' . $this->table . '"; }'; eval($code2); Alias::facade('Dbk' . $facade2, $facade2, 'Keystore'); } } return $this; }
private function facade() { $crud = new Crud($this); $config = $crud->config(); $facade = isAke($config, 'facade', false); $facade2 = false; if (false === $facade) { $facade = ucfirst($this->db) . ucfirst($this->table); if ($this->db == SITE_NAME) { $facade2 = ucfirst($this->table); } } $class = '\\Dbjson\\' . $facade; if (!class_exists($class)) { $code = 'namespace Dbjson; class ' . $facade . ' extends Facade { public static $database = "' . $this->db . '"; public static $table = "' . $this->table . '"; }'; eval($code); Alias::facade('Db' . $facade, $facade, 'Dbjson'); } if (false !== $facade2) { $class2 = '\\Dbjson\\' . $facade2; if (!class_exists($class2)) { $code2 = 'namespace Dbjson; class ' . $facade2 . ' extends Facade { public static $database = "' . $this->db . '"; public static $table = "' . $this->table . '"; }'; eval($code2); Alias::facade('Db' . $facade2, $facade2, 'Dbjson'); } } }