schema для bd

This commit is contained in:
CORP\phedor 2018-06-08 15:20:43 +03:00
parent 0c9ae85fdc
commit cbd50862ce
3 changed files with 9 additions and 2 deletions

View file

@ -273,7 +273,7 @@ class Controller_Component
$instance->componentsConfig[] = $editor;
} else {
global $componentsConfig;
$componentsConfig[] = $editor;
$componentsConfig[] = $editor;
}
}

View file

@ -5,11 +5,14 @@
*/
class Controller_Service
{
public $viewPath = array();
public $viewPath = [];
public $webPath = [];
public $registry; // Registry->getInstance
public $template;
public $templatePath;
public $COMPONENTS_WEB;
public $db;
public function getTemplatePath($name)
{

View file

@ -35,6 +35,10 @@ class Database extends PDO
if ($dsn['phptype'] == 'pgsql') {
$connection->query('SET client_encoding="UTF-8"');
}
if (isset($dsn['schema'])) {
$connection->query('SET search_path TO ' . $dsn['schema']);
}
}
if ($dsn['phptype'] == 'sqlite') {
/*.Database.*/$connection = new static("{$dsn['phptype']}:{$dsn['database']}");