chore: Типы
This commit is contained in:
parent
3169ea2032
commit
08defbd046
5 changed files with 12 additions and 6 deletions
|
|
@ -47,7 +47,7 @@ class HttpResponse
|
|||
|
||||
if (isset($this->param['Transfer-Encoding']) && $this->param['Transfer-Encoding'] == 'chunked') {
|
||||
//$this->data = substr($this->response, $this->offset);
|
||||
$index = hexdec($this->getLine());
|
||||
$index = (int)hexdec($this->getLine());
|
||||
$chunk = [];
|
||||
while ($index > 0) {
|
||||
$chunk [] = substr($this->response, $this->offset, $index);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class Component
|
|||
foreach ($this->viewPath as $index => $viewPath) {
|
||||
// Загружать шаблон по умолчанию если не найден текущий
|
||||
$dir = Path::join($this->viewPath[$index], 'templates', $template);
|
||||
if(is_dir($dir)) {
|
||||
if (is_dir($dir)) {
|
||||
$tpl = new PHPTAL(Path::join($this->viewPath[$index], 'templates', $template, $name));
|
||||
$tpl->setPhpCodeDestination(PHPTAL_PHP_CODE_DESTINATION);
|
||||
$selected = $index;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class Front extends Action
|
|||
|
||||
public function execute(HttpRequest $request)
|
||||
{
|
||||
$name = $request->get('module', $this->default);
|
||||
$name = $request->getString('module', $this->default);
|
||||
try {
|
||||
return $this->loadModule($name, $request);
|
||||
} catch (UserMessageException $ex) { //Исключение с понятным пользователю сообщением
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ namespace ctiso {
|
|||
return $result;
|
||||
}
|
||||
|
||||
function query($query, $fetchMode = PDO::FETCH_INTO, mixed $_arg1 = null, mixed $_arg2 = null): PDOStatement {
|
||||
/** @var PDOStatement */
|
||||
$result = parent::query($query, $fetchMode);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает DSN
|
||||
* @return DSN
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class Login extends Filter
|
|||
/**
|
||||
* Проверка авторизации
|
||||
* @param HttpRequest $request
|
||||
* @return Boolean Авторизовани пользователь или нет
|
||||
* @return bool Авторизовани пользователь или нет
|
||||
*/
|
||||
public function isLoggin(HttpRequest $request)
|
||||
{
|
||||
|
|
@ -50,8 +50,8 @@ class Login extends Filter
|
|||
switch ($request->getAction()) {
|
||||
// Авторизация по постоянному паролю
|
||||
case 'login':
|
||||
$login = $request->get('login', '') ;
|
||||
$password = $request->get('password');
|
||||
$login = $request->getString('login', '') ;
|
||||
$password = $request->getString('password');
|
||||
|
||||
$result = $this->role->getUserByLogin($login); // Поиск по логину
|
||||
if ($result) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue