Triggers callback.

@return bool|null
501665
public function beforeAttach()
    {
        $handler = $this->get('handler');
        if (class_exists($handler)) {
            $handler = new $handler();

            return $handler->beforeAttach($this);
        }
    }
807566
private function checkCallback() : void
    {
        if (isset($this->onload) && !$this->is_loaded) {
            $this->is_loaded = true;
            call_user_func($this->onload, $this);
        }
    }
494074
private function call() {

        if(null === $this -> driver) {
            return trigger_error('Driver is not set. Set the driver with the setDriver() method', E_USER_ERROR);
        }

        if(null === $this -> driverInstance) {
        	$this -> driverInstance = new $this -> driver();
        }

        return $this -> driverInstance;
    }
880074
protected function validateEditTrigger()
    {
        $this->setSubmitted('trigger', null, false);
        $this->setSubmittedBool('status');
        $this->setSubmittedArray('data.conditions');
        $this->setSubmitted('update', $this->data_trigger);

        $this->validateComponent('trigger');

        return !$this->hasErrors();
    }
568533
protected function fireInputObserver()
    {
        $response = rtrim(self::input(), PHP_EOL);

        if (strcasecmp($response, $this->ec) === 0) {
            return null;
        }

        $callback = $this->io;

        $callback($response);

        usleep(100);

        $this->fireInputObserver();
    }
145815
public function activate(): void
    {
        if ($this->stopBuffering) {
            $this->buffering = false;
        }
        if (!$this->handler instanceof HandlerInterface) {
            $record = end($this->buffer) ?: null;

            $this->handler = call_user_func($this->handler, $record, $this);
            if (!$this->handler instanceof HandlerInterface) {
                throw new \RuntimeException("The factory callable should return a HandlerInterface");
            }
        }
        $this->handler->handleBatch($this->buffer);
        $this->buffer = [];
    }
777462
public static function exec()
    {
        if (self::$state > 0) {
            return null;
        }

        self::$state = 1;

        self::trigger('init');

        if (self::env('maintenance')) {
            self::$state = 4;
            self::stop(503);
        }

        self::trigger('changestatus', array(\UtilsStatusCode(), null));

        $resp = Route::get();

        if (is_integer($resp)) {
            self::$state = 5;
            self::stop($resp, 'Invalid route');
        }

        $callback = $resp['callback'];

        if (!$callback instanceof \Closure) {
            $parsed = explode(':', $callback, 2);

            $callback = '\\Controller\\' . strtr($parsed[0], '.', '\\');
            $callback = array(new $callback, $parsed[1]);
        }

        $output = call_user_func_array($callback, $resp['args']);

        if (class_exists('\\Inphinit\\Http\\Response', false)) {
            Response::dispatch();
        }

        if (class_exists('\\Inphinit\\Viewing\\View', false)) {
            View::dispatch();
        }

        if (self::$state < 2) {
            self::$state = 2;
        }

        self::trigger('ready');

        if ($output || is_numeric($output)) {
            echo $output;
        }

        if (self::$state < 3) {
            self::$state = 3;
        }

        self::trigger('finish');

        if (self::$state < 4) {
            self::$state = 4;
        }
    }
667618
public function trigger($event, $args = array())
	{
		if (!($event instanceof Event))
		{
			if (isset($this->events[$event]))
			{
				$event = $this->events[$event];
			}
			else
			{
				$event = new Event($event);
			}
		}

		// If a listener group was specified
		// lazy load the listeners.
		if ($group = $event->getGroup())
		{
			$this->addListeners($group);
		}

		// Attach any incoming aruments
		foreach ((array) $args as $name => $arg)
		{
			$event->addArgument($name, $arg);
		}

		// Are there any listeners for this event?
		if (isset($this->listeners[$event->getName()]))
		{
			foreach ($this->listeners[$event->getName()] as $listener)
			{
				// Call the event listener
				if ($listener instanceof Closure)
				{
					$response = call_user_func($listener, $event);
				}
				else
				{
					$response = call_user_func(array($listener, $event->getName()), $event);
				}

				// Attach response
				if (!is_null($response))
				{
					$event->addResponse($response);
				}

				// Is propagation stopped?
				if ($event->isStopped())
				{
					break;
				}
			}
		}

		return $event->getResponse();
	}
53703
public function build()
    {
        $trigger = new CronTrigger();

        $trigger->setCronExpression($this->cronExpression);
        $trigger->setMisfireInstruction($this->misfireInstruction);
//        $trigger->setTimeZone(cronExpression.getTimeZone());

        return $trigger;
    }
1211825
public function trigger($event_name, array $arguments = [])
    {
        // Read in our config/events file so that we have them all!
        if (! $this->have_read_from_file)
        {
            $this->readConfigFile();
        }

        foreach ($this->listeners($event_name) as $listener)
        {
            if (! is_callable($listener)) continue;

            $result = call_user_func_array($listener, $arguments);

            if ($result === false)
            {
                return false;
            }
        }

        return true;
    }
1371538
public function required($required = null) {

		if(false === is_bool($required) && null !== $required) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($required)), E_USER_ERROR);
		}

		if(null === $required) {
			$required = true;
		}

		foreach($this -> getFieldnames() as $field) {
			$this -> required[$field] = $required;
		}

		return $this;
	}
227217
public static function trigger($condition=true,...$params) {
        //$this->middle(false);
        if ($condition == false) {
            return false;
        }

        return call_user_func_array([get_called_class(),'run'],$params);
    }
948872
public function executeCallback()
    {
        if (method_exists($this->callbackObject, $this->callbackFunction)) {
            return call_user_func_array(array($this->callbackObject, $this->callbackFunction), $this->callbackParameters);
        }

        return null;
    }
1128563
protected function trigger()
    {
        $eventName = $this->getParameter('name');

        if(StringUtils::strToBool($this->getParameter('allowTemplateCode')) == true)
            $this->allowTemplateCode();

        $params = $this->getParameters();

        $output = new Transport();
        $output->String = '';

        foreach($params as $k => $v) {
            if($k != 'String' && $k !='name') {
                $output->$k = $v;
            }
        }

        $this->Events->trigger($eventName, $output);

        return $output->String;
    }
46803
protected function trigger(ServiceEvent $event, $callback = null)
	{
		return $this->getEventManager()->trigger($event, $callback);
	}
478248
private function triggerExit()
    {
        $msg = 'You are not authenticated';

        switch ($this->exitTrigger) {
            case 'die':
                die($msg);
                break;
            case 'exception':
                throw new HttpException($msg);
                break;
            default:
                die($msg);
                break;
        }
    }
1308059
public function trigger($event)
    {
        $result = false;
        if (isset(self::$event[$event])) {
            $result = call_user_func_array(self::$event[$event], [$this]);
        }

        return $result;
    }