Handle on input end

@return null
161382
protected function onInputEnd()
    {
        foreach ($this->container[0]["data"] as $key => $rows) {
            if (isset($this->container[1]["data"][$key])) {
                foreach ($rows as $first) {
                    foreach ($this->container[1]["data"][$key] as $second) {
                        $this->next(array_merge($first, $second));
                    }
                }
            }
        }
    }
1054846
protected function _tick() {
        while (true) {
            // Grab a line of PHP code from the prompt
            $line = $this->_getInput();

            /**
             * Note that $this->__result will be populated, if no target variable is given
             * in the expression. In other words, this will populate $this->__result:
             * $someModel->fetchAll();
             * But this won't:
             * $rows = $someModel->fetchAll();
             * ...because we assume the user wants to do something with the variable.
             */
            if (!$this->_input && !preg_match('/^(\$\w+\s?\=)|print|echo/', $line)) {
                $line = '$this->__result = ' . $line;
            }

            $this->_input .= $line;

            // If no semicolon is found at the end, assume
            // multi-line input. The user is therefore not finished,
            // so we just continue here and wait for that semicolon.
            if (substr($line, -1) !== ';') {
                continue;
            }

            // Execute input, and grab its output
            ob_start(array($this, 'output'));
            eval($this->_input);
            ob_end_flush();

            // Clear result var
            $this->__result = null;
            // Reset input
            $this->_input = '';
        }
    }
817602
private function ensureInput() {
		if(!$this->input) {
			$this->getInputFromHTTP();
			if(!$this->input) throw new WebHookHandlerException('Could not fetch input', WebHookHandlerException::INPUT_FETCH_FAILED);
		}
	}
1357350
public function handle()
    {
        if (parent::handle() === false) return false;

        $this->createTest();
        if (!$this->option('api')) $this->generateView();
        $this->generateTranslation();
        $this->appendRouteFile();

        return null;
    }
397471
public function end()
    {
        $html = Html::endTag(ArrayHelper::keyExists('tag', $this->options) ? $this->options['tag'] : 'div');
        $this->form->afterFieldRender($this);

        return $html;
    }
720232
public function end()
	{
		if ($this->config['layout'] !== false && is_file($file = $this->getLayoutPath()) ) {
			extract($this->data, EXTR_OVERWRITE|EXTR_REFS);
            require($this->cache($file, true));
		}
	}
1290083
protected function _handle()
    {
        $ids = $this->_processIds();
        $subject = $this->_constructSubject($ids);

        $event = $this->_trigger('beforeBulk', $subject);
        if ($event->isStopped()) {
            return $this->_stopped($subject);
        }

        if ($this->_bulk($subject->query)) {
            $this->_success($subject);
        } else {
            $this->_error($subject);
        }

        return $this->_redirect($subject, ['action' => 'index']);
    }
318071
public static function end()
    {
        if (!empty(static::$stack)) {
            $widget = array_pop(static::$stack);
            if (get_class($widget) === get_called_class()) {
                echo $widget->run();
                return $widget;
            } else {
                throw new InvalidCallException('Expecting end() of ' . get_class($widget) . ', found ' . get_called_class());
            }
        } else {
            throw new InvalidCallException('Unexpected ' . get_called_class() . '::end() call. A matching begin() is not found.');
        }
    }
136231
private void handleDone() {
        // Attempt to complete the current token token
        performCompletion();

        // Hide the keyboard
        InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
                Context.INPUT_METHOD_SERVICE);
        if (imm != null) {
            imm.hideSoftInputFromWindow(getWindowToken(), 0);
        }
    }
1025587
public function endForm(): void
    {
        $useCsrf = (isset($this->formOptions['use_csrf'])) ?
            filter_var($this->formOptions['use_csrf'], FILTER_VALIDATE_BOOLEAN)
            : true;

        $tokenField = ($useCsrf) ? HtmlTag::createElement('input')
            ->set('id', 'csrf_token')
            ->set('name', 'csrf_token')
            ->set('type', 'hidden')
            ->set('value', $this->generateCsrfToken())
            : '';

        echo $tokenField . '</form>';
    }
635233
public function onInputEnd()
    {
        $this->sortProcess();
        foreach ($this->data as $row) {
            $this->next($row);
        }
        unset($this->data);
    }
196457
protected function end()
    {
        if ($this->matchChar(';')) {
            return true;
        }

        if ($this->count === strlen($this->buffer) || $this->buffer[$this->count] === '}') {
            // if there is end of file or a closing block next then we don't need a ;
            return true;
        }

        return false;
    }
298061
def handle_user_input
      while true
        begin
          break if !wait_for_prompt
          input = $stdin.gets.chomp!
          execute_action(input, true)
        rescue SignalException => e
          return false
        end
      end
      wait
    end
1063788
protected function onInputEnd()
    {
        //Send meta
        $countRow = count($this->data);
        $newMeta = array(
            "columns" => array(),
        );
        for ($i = 0; $i <= $countRow; $i++) {
            $newMeta["columns"]["c$i"] = array("type" => "unknown");
        }
        $newMeta["columns"]["c0"]["type"] = "string";
        $this->sendMeta($newMeta);

        $keys = ($countRow > 0) 
            ? array_keys($this->data[0]) : array_keys($this->metaData["columns"]);

        //Send each rows
        foreach ($keys as $cKey) {
            $row = array("c0" => isset($this->metaData["columns"][$cKey]["label"]) 
                ? $this->metaData["columns"][$cKey]["label"] : $cKey);
            for ($i = 0; $i < $countRow; $i++) {
                $row["c" . ($i + 1)] = $this->data[$i][$cKey];
                unset($this->data[$i][$cKey]);
            }
            $this->next($row);
        }
    }
659981
public function endInput($source)
    {
        if (!$this->metaSent) {
            $this->sendMeta($this->newMeta);
        }
        $func = Util::get($this->params, '{end}', null);
        if (is_callable($func)) {
            $newRows = $func($this->index, $this->mapState);
            $newRows = $this->to2DArray($newRows);
            foreach ($newRows as $row) {
                $this->next($row);
            }
        }
        parent::endInput($source);
    }
280076
protected function fallbackHandler(): void
	{
		$this->handle(Throwable::class, function($e): void
		{
			echo '[ ' . get_class($e) . '] ' . $e->getMessage() . ' on line [ ' . $e->getLine() . ' ] in [ ' . $e->getFile() . ' ]';

			echo PHP_EOL;

			echo $e->getTraceAsString();
		});
	}
559246
protected function end()
	{
		\ManiaLive\Utilities\Logger::debug('end()');

		$this->showTansfertLabel(null, -50);
		foreach($this->storage->players as $player)
		{
			try
			{
				$this->connection->sendOpenLink((string) $player->login, '#qjoin='.$this->lobby->backLink, 1);
			}
			catch (\DedicatedApi\Xmlrpc\Exception $e)
			{
				//do nothing
			}
		}
		$this->connection->cleanGuestList();

		$this->match = null;
		$this->matchId = null;
		$this->matchMakingService->updateServerCurrentMatchId(
			null,
			$this->storage->serverLogin,
			$this->scriptName,
			$this->titleIdString
		);
		$this->connection->setForcedTeams(false);
		$this->sleep();
	}