init
This commit is contained in:
parent
dbe6800757
commit
b39c293b97
10
index.php
10
index.php
|
@ -43,15 +43,13 @@ class JobSql implements ISqlBase {
|
||||||
public function Get(): string {
|
public function Get(): string {
|
||||||
return "Select * from jobs where id = :id";
|
return "Select * from jobs where id = :id";
|
||||||
}
|
}
|
||||||
public static function Create() {
|
|
||||||
return new Job();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Job extends BaseModel {
|
class Job extends BaseModel {
|
||||||
private static $sql = JobSql::Create();
|
public static function Initialize() {
|
||||||
public function __construct() {
|
if (self::$sql === null) {
|
||||||
parent::__construct( new JobSql() );
|
self::$sql = new JobSql();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$dns = 'pgsql:host=localhost;port=5432;dbname=dynamic_dev;user=test;password=pass123';
|
$dns = 'pgsql:host=localhost;port=5432;dbname=dynamic_dev;user=test;password=pass123';
|
||||||
|
|
Loading…
Reference in New Issue