mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Added more plugin hooks
Added proxy auth plugin example (dev)
This commit is contained in:
parent
819ba4a2ef
commit
9c43105e95
8 changed files with 432 additions and 123 deletions
|
|
@ -9,6 +9,11 @@ class Domain extends \RainLoop\Providers\AbstractProvider
|
|||
*/
|
||||
private $oDriver;
|
||||
|
||||
/**
|
||||
* @var \RainLoop\Plugins\Manager
|
||||
*/
|
||||
private $oPlugins;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
|
@ -19,9 +24,11 @@ class Domain extends \RainLoop\Providers\AbstractProvider
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(\RainLoop\Providers\Domain\DomainInterface $oDriver)
|
||||
public function __construct(\RainLoop\Providers\Domain\DomainInterface $oDriver,
|
||||
\RainLoop\Plugins\Manager $oPlugins)
|
||||
{
|
||||
$this->oDriver = $oDriver;
|
||||
$this->oPlugins = $oPlugins;
|
||||
$this->bAdmin = $this->oDriver instanceof \RainLoop\Providers\Domain\DomainAdminInterface;
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +49,13 @@ class Domain extends \RainLoop\Providers\AbstractProvider
|
|||
*/
|
||||
public function Load($sName, $bFindWithWildCard = false, $bCheckDisabled = true)
|
||||
{
|
||||
return $this->oDriver->Load($sName, $bFindWithWildCard, $bCheckDisabled);
|
||||
$oDomain = $this->oDriver->Load($sName, $bFindWithWildCard, $bCheckDisabled);
|
||||
if ($oDomain instanceof \RainLoop\Domain)
|
||||
{
|
||||
$this->oPlugins->RunHook('filter.domain', array(&$oDomain));
|
||||
}
|
||||
|
||||
return $oDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue