Постфиксная запись типов вместо префиксной

This commit is contained in:
CORP\phedor 2018-05-04 14:57:52 +03:00
parent 04662a94df
commit 11370eecc9
33 changed files with 95 additions and 79 deletions

View file

@ -5,7 +5,7 @@ use ctiso\Database,
ctiso\Database\Statement;
// Класс должен быть в библиотеке приложения
class User
class User implements UserInterface
{
const LIFE_TIME = 1800; // = 30min * 60sec;
@ -26,6 +26,10 @@ class User
$this->db = $db;
}
public function getName() {
return $this->name;
}
public function getUserByQuery(Statement $stmt)
{
$result = $stmt->executeQuery();

View file

@ -0,0 +1,11 @@
<?php
namespace ctiso\Role;
interface UserInterface {
function getUserByQuery(Statement $stmt);
function getUserByLogin($login);
function getUserById($id);
function getName();
function setSID();
}