backup: live-stand vor erstem git-deployment

This commit is contained in:
2026-06-29 11:04:33 +02:00
commit 90368b8a29
699 changed files with 162032 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace DynCom\mysyde\common\traits;
use DynCom\mysyde\common\classes\Hook;
/**
* Created by PhpStorm.
* User: Bauer
* Date: 15.07.2015
* Time: 11:20
*/
trait hookableTrait
{
/**
* @param $eventName
* @param $data
*/
protected function updateHooks($eventName, $data)
{
$parents = class_parents($this);
$interfaces = class_implements($this);
$className = get_class($this);
$notificationTargets = [$className];
$namespace = '';
foreach ($parents as $parent) {
$notificationTargets[] = $parent;
}
foreach ($interfaces as $interface) {
$notificationTargets[] = $interface;
}
foreach ($notificationTargets as $target) {
Hook::update($eventName, $data, $target);
}
Hook::update($eventName, $data);
}
}