<?php
/*---------------------------------------------------------------------------
 * @Project: Alto CMS
 * @Project URI: http://altocms.com
 * @Description: Advanced Community Engine
 * @Copyright: Alto CMS Team
 * @License: GNU GPL v2 & MIT
 *----------------------------------------------------------------------------
 */

/**
 * Регистрация хука для вывода каптчи
 *
 * @package hooks
 * @since 1.0
 */
class HookCaptcha extends Hook {
    /**
     * Регистрируем хуки
     */
    public function RegisterHook() {

        $this->AddHookTemplate('registration_captcha', 'TemplateCaptcha', __CLASS__);
    }

    /**
     * Обработка хука
     *
     * @return string
     */
    public function TemplateCaptcha($aData) {

        $sType = isset($aData['type']) ? $aData['type'] : 'registration';

        return $this->Viewer_Fetch("tpls/commons/common.captcha.$sType.tpl");
    }

}

// EOF