mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Privacy/GDPR friendly version (removed: Social, Gravatar, Facebook, Google, Twitter, DropBox, OwnCloud)
Also removed: POP3, OAuth2 and update feature Added: admin password_hash/password_verify Requires: PHP 7.3+ Replaced: CRLF with LF Replaced: pclZip with ZipArchive
This commit is contained in:
parent
15ceddc202
commit
2cada68f41
293 changed files with 23728 additions and 85420 deletions
|
|
@ -1,55 +1,55 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of MailSo.
|
||||
*
|
||||
* (c) 2014 Usenko Timur
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace MailSo;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
*/
|
||||
class Hooks
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
static $aCallbacks = array();
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param array $aArg
|
||||
*/
|
||||
static public function Run($sName, $aArg = array())
|
||||
{
|
||||
if (isset(\MailSo\Hooks::$aCallbacks[$sName]))
|
||||
{
|
||||
foreach (\MailSo\Hooks::$aCallbacks[$sName] as $mCallback)
|
||||
{
|
||||
\call_user_func_array($mCallback, $aArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param mixed $mCallback
|
||||
*/
|
||||
static public function Add($sName, $mCallback)
|
||||
{
|
||||
if (\is_callable($mCallback))
|
||||
{
|
||||
if (!isset(\MailSo\Hooks::$aCallbacks[$sName]))
|
||||
{
|
||||
\MailSo\Hooks::$aCallbacks[$sName] = array();
|
||||
}
|
||||
|
||||
\MailSo\Hooks::$aCallbacks[$sName][] = $mCallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of MailSo.
|
||||
*
|
||||
* (c) 2014 Usenko Timur
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace MailSo;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
*/
|
||||
class Hooks
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
static $aCallbacks = array();
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param array $aArg
|
||||
*/
|
||||
static public function Run($sName, $aArg = array())
|
||||
{
|
||||
if (isset(\MailSo\Hooks::$aCallbacks[$sName]))
|
||||
{
|
||||
foreach (\MailSo\Hooks::$aCallbacks[$sName] as $mCallback)
|
||||
{
|
||||
\call_user_func_array($mCallback, $aArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param mixed $mCallback
|
||||
*/
|
||||
static public function Add($sName, $mCallback)
|
||||
{
|
||||
if (\is_callable($mCallback))
|
||||
{
|
||||
if (!isset(\MailSo\Hooks::$aCallbacks[$sName]))
|
||||
{
|
||||
\MailSo\Hooks::$aCallbacks[$sName] = array();
|
||||
}
|
||||
|
||||
\MailSo\Hooks::$aCallbacks[$sName][] = $mCallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue