Perform the early invocation of a command.

@param string $when Named execution hook
170753
private function do_early_invoke( $when ) {
		if ( ! isset( $this->early_invoke[ $when ] ) ) {
			return;
		}

		// Search the value of @when from the command method.
		$real_when = '';
		$r         = $this->find_command_to_run( $this->arguments );
		if ( is_array( $r ) ) {
			list( $command, $final_args, $cmd_path ) = $r;

			foreach ( $this->early_invoke as $_when => $_path ) {
				foreach ( $_path as $cmd ) {
					if ( $cmd === $cmd_path ) {
						$real_when = $_when;
					}
				}
			}
		}

		foreach ( $this->early_invoke[ $when ] as $path ) {
			if ( $this->cmd_starts_with( $path ) ) {
				if ( empty( $real_when ) || ( $real_when && $real_when === $when ) ) {
					$this->run_command_and_exit();
				}
			}
		}
	}
896418
protected function onInput($data)
    {
        $func = $this->params;

        $data = $func($data);
        if ($data) {
            $this->next($data);
        }
    }
1177617
void scheduleInitializationDone() {

        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            public void execute() {

                m_initialized = true;
                if (m_active) {
                    removeEditorDisabledStyle();
                } else {
                    setEditorDisabledStyle();
                }
            }
        });
    }
1328427
protected function onInit()
    {
        if (is_array($this->params)) {
            foreach ($this->params as $cName => $cMap) {
                $cFunc = Utility::get($cMap, "{func}");
                if (is_callable($cFunc)) {
                    $this->mapFuncs[$cName] = $cFunc;
                }

            }
        }

    }
996166
public function execute()
    {
        if (!$this->isEmpty()) {
            $this->table->delete($this->context + $this->where)->run();
        }

        parent::execute();
    }
345526
public function execute($action = NULL)
	{
		$action = ($action == NULL)
			? strtolower($this->request->getMethod())
			: $action;

		$this->before();
		$this->{$action}();
		$this->after();
	}
1061866
public function execute($name, AnCommandContext $context)
    {
        $parts = explode('.', $name);

        if ($parts[0] == 'before') {
            $this->_fetchOwner($context);
        }

        parent::execute($name, $context);
    }
887173
function onQuery( $query, $params = array() ) {

        if ( is_callable( $this->queryCallback ) ) {

            call_user_func( $this->queryCallback, $query, $params );

        }

    }
782124
public function delete($where) {
        $this->notifyObservers('beforeDelete', array($this, &$where));
        $result = parent::delete($where);
        $this->notifyObservers('afterDelete', array($this, $result, $where));
        return $result;
    }
70362
private static function beforeProcess(string $processName, $boot)
    {
        if ($boot) {
            BeanFactory::reload();
            $initApplicationContext = new InitApplicationContext();
            $initApplicationContext->init();
        }

        self::waitChildProcess($processName, $boot);

        App::trigger(ProcessEvent::BEFORE_PROCESS, null, $processName);
    }
67787
def execute(self, array_in, expression, **kwargs):
        """"""

        context = self.get_context(array_in, expression, kwargs)
        context.update(kwargs)
        return ma.masked_where(self.evaluate_expression(expression, context), array_in)
880742
private function beforeAfterControllerAction(string $when): void
    {
        $method = $when.\ucfirst($this->routeAction);

        if (\method_exists($this->controller, $method) && $method !== $when) {
            \call_user_func([$this->controller, $method]);
        }
    }
123053
public function onInitStatusAttribute($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        if (empty($sender->getStatus())) {
            $sender->setStatus(self::$statusActive);
        }
    }
582833
public function before($findName, $withName, callable $middleware)
    {
        $this->splice($findName, $withName, $middleware, true);
    }
908044
private function executeBySyntax($syntax, $table, $data, $where = null, $where_params = array(), $stmt_key = null)
    {
        if (!is_null($where) && !is_array($where)) {
            $where = array($where);
        }

        if (is_object($data)) {
            $data = (array) $data;
        }

        $data = $this->removeNonExistentColumns($table, $data, $stmt_key);

        // support for scalar param
        if (!is_array($where_params)) {
            $where_params = array($where_params);
        }

        if (empty($stmt_key)) {
            $stmt = $this->getSetStmt($syntax, $table, $data, $where);
        } elseif (empty($this->prev_stmt[$stmt_key])) {
            $stmt = $this->getSetStmt($syntax, $table, $data, $where);
            $this->prev_stmt[$stmt_key] = $stmt;
        } else {
            $stmt = $this->prev_stmt[$stmt_key];
        }

        $stmt->execute(array_merge(array_values($data), $where_params));

        return $stmt;
    }
1046115
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->triggerInitialBuild($input, $output);
        $this->startGulpWatcher($input, $output);
    }
568123
private function beforeAfterController(string $when): void
    {
        if (\method_exists($this->controller, $when)) {
            \call_user_func([$this->controller, $when]);
        }
    }