1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-30 21:45:01 +03:00
ifhub.club/classes/actions/Init.class.php

59 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Класс инициализации экшенов.
* Он вызывается всегда перед запуском любого экшена. Может выполнять какие то инициализирующие действия, а так же может помочь при введении инвайтов,
* т.е. перенапрявлять всех неавторизованных юзеров на страницу регистрации по приглашению
*
* @package actions
* @since 1.0
*/
class InitAction {
/**
* Объект ядра
*
* @var Engine|null
*/
protected $oEngine=null;
/**
* Конструктор
*
*/
public function __construct($oEngine) {
$this->oEngine=$oEngine;
}
/**
* Ставим хук на вызов неизвестного метода и считаем что хотели вызвать метод какого либо модуля
* @see Engine::_CallModule
*
* @param string $sName Имя метода
* @param array $aArgs Аргументы
* @return mixed
*/
public function __call($sName,$aArgs) {
return $this->oEngine->_CallModule($sName,$aArgs);
}
/**
* Логика инициализации
*
*/
public function InitAction() {
$this->Hook_Run('init_action');
}
}
?>