Fire an event for this cache instance.

@param  string  $event
@param  array  $payload
@return void
484846
protected function fireCacheEvent($event, $payload)
	{
		if (isset($this->events))
		{
			$this->events->fire('cache.'.$event, $payload);
		}
	}
1242949
public function onSaving($event, $payload)
    {
        list($model) = $payload;

        if (!$this->isEncodable($model)) {
            return;
        }

        foreach ($model->getDirtyEncodableAttributes() as $attribute) {

            // If the attribute has a value, encode the attribute
            if ($model->getAttribute($attribute)) {
                $model->encodeOnSave($attribute);
            }

            // Otherwise delete encoding references
            elseif ($encoding = $model->encoding($attribute)) {
                $encoding->delete();
            }
        }
    }
818004
public function fire($event, $payload=[], $halt=false)
    {
        return $this->dispatcher->fire($event, $payload, $halt);
    }
1214871
public function onEvent(Event $event = null)
    {
        while (!empty($this->messages)) {
            $message = array_shift($this->messages);

            $this->handle($message, $this->dispatcher);
        }
    }
358250
public static function fire($event, $data = null)
    {
        if (!is_array($data)) {
            $data = array($data);
        }
        array_unshift($data, $event);

        $retval = true;

        foreach (array('*', $event) as $e) {
            if (!array_key_exists($e, self::$events)) {
                continue;
            }

            foreach (self::$events[$e] as $callback) {
                if (!is_callable($callback)) {
                    continue;
                }

                if (($retval = call_user_func_array($callback, $data)) === false) {
                    break 2;
                }
            }
        }

        return $retval !== false;
    }
674864
protected function respond($event, $error, $status, $payload = [])
    {
        $response = $this->events->fire($event, $payload, true);

        return $response ?: $this->response->json(arrayView('phpsoft.users::errors/authenticate', [
            'error' => $error
        ]), $status);
    }
775111
public function push($event, $channel = 'public', array $payload = [])
    {
        $payload = $this->preparePayload($payload);
        $this->validateEvent($event);
        $channels = $this->validateChannel($channel);

        $url = $this->getURL();

        $headers = [
            'body' => [
                'private'  => $this->privateKey,
                'channels' => $channels,
                'event'    => $event,
                'payload'  => $payload
            ]
        ];

        $response = $this->processRequest($url, $headers);

        return $response;
    }
815246
public function fire(string $event, array $params = []) {
        $activeEvent = $this->registeredEvents[$event];

        if (!$activeEvent instanceof Event) {
            throw new \Nuki\Exceptions\Base('The active registered event is not a valid event');
        }

        $activeEvent->setParams($params);
        $activeEvent->process();
        $activeEvent->setStatus(self::EVENT_STARTED);

        $activeEvent->notify();
    }
827668
public function push($payload): void
    {
        // attach sender if not broadcast
        if (! $this->broadcast && $this->sender && ! $this->hasDescriptor($this->sender)) {
            $this->addDescriptor($this->sender);
        }

        // check if to broadcast to other clients
        if ($this->shouldBroadcast()) {
            $this->addDescriptors($this->getWebsocketConnections());
        }

        // push message to designated fds
        foreach ($this->descriptors as $descriptor) {
            if ($this->shouldPushToDescriptor($descriptor)) {
                $this->server->push($descriptor, $payload, $this->opcode);
            }
        }
    }
672643
private function fireEvent($event, $payload = [], $halt = false)
    {
        return $this->getEventDispatcher()->fire($event, $payload, $halt);
    }
920747
public function fireOnce($event, $payload=[], $halt=false)
    {
        if(isset($this->firedEvents[$event])){
            return;
        }
        return $this->fire($event, $payload, $halt);
    }
1228286
public function fireDecoyEvent($event, $args = null)
    {
        $event = "decoy::model.{$event}: ".get_class($this);

        return Event::fire($event, $args);
    }
334143
public function execute(string $event)
    {
        foreach ($this->members as $member) {
            if ($member->getEvent() === $event) {
                $member->execute();
            }
        }
    }
181320
public function event($name, $payload = null) {
		$this->log->log("EVENT: $name",  Net_XMPP_XMPPHP_Log::LEVEL_DEBUG);
		foreach($this->eventhandlers as $handler) {
			if($name == $handler[0]) {
				if($handler[2] === null) {
					$handler[2] = $this;
				}
				$handler[2]->$handler[1]($payload);
			}
		}
		foreach($this->until as $key => $until) {
			if(is_array($until)) {
				if(in_array($name, $until)) {
					$this->until_payload[$key][] = array($name, $payload);
					if(!isset($this->until_count[$key])) {
						$this->until_count[$key] = 0;
					}
					$this->until_count[$key] += 1;
					#$this->until[$key] = false;
				}
			}
		}
	}
316921
protected function fireConnectionEvent($event)
	{
		if (isset($this->events))
		{
			$this->events->fire('connection.'.$this->getName().'.'.$event, $this);
		}
	}
328945
public function handle($event, $args) {
		if (isset($this->callback[$event])) {
			$this->callback[$event](...$args);
		}
	}
1198439
final protected function applyChange(Serializable $payload)
    {
        $this->apply($payload);
        $this->changes()->addEventFromPayload($payload);
    }