Build the control handler cases.
@return string The built code.
425310
protected function buildControlHandlerCases() {
        $result = '';
        foreach ($this->eventHandlerFactory->getAllControlHandlers() as $handler) {
            /* @var $handler \ManiaScript\Builder\Event\Handler\AbstractHandler */
            $result .= $handler->getInlineCode();
        }
        return $result;
    }
517036
private static function buildControlCharacters()
    {
        for ($i = 0; $i <= 31; ++$i) {
            if ($i != 9 && $i != 10 && $i != 13) {
                $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';
                $replace = chr($i);
                self::$controlCharacters[$find] = $replace;
            }
        }
    }
1295084
private function handle(){
        $params = [
            "start"     => null,
            "finish"    => null,
            "response"  => null,
            "error"     => null,
        ];

        try{
            $params["start"]    = microtime(true);
            $params["response"] = $this->handler->handle($this->request);
        }catch(\Throwable $e){
            $params["error"]    = $e;
            $this->error        = $e;
        }finally{
            $params["finish"]   = microtime(true);
        }

        $this->event(new Event("response.handle.after", $params));

        return $params["response"];
    }
1155536
public function handler()
    {
        $handler = $this->pop();

        if (null !== $handler) {
            $this->push($handler);
        }

        return $handler;
    }
646053
protected function _startErrorHandler()
    {
        $this->_whoops = new Run();
        $environment = $this->getConfiguration()
            ->get('environment', 'production');

        switch ($environment) {
            case 'production':
                $handler = new Production();
                $handler->setApplication($this);
                break;

            default:
                $handler = new PrettyPageHandler();
        }

        $this->_whoops->pushHandler($handler);

        $this->_whoops->register();
        return $this;
    }
634347
private function getCommandProcessBuilder()
    {
        $pb = new ProcessBuilder();

        // PHP wraps the process in "sh -c" by default, but we need to control
        // the process directly.
        if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
            $pb->add('exec');
        }

        $pb
            ->add('php')
            ->add($this->getContainer()->getParameter('kernel.root_dir').'/console')
            ->add('--env='.$this->env)
        ;

        return $pb;
    }
1218824
public function getHandle()
    {
        if (!isset($this->handle) && $this->fieldId) {
            $field = Craft::$app->fields->getFieldById($this->fieldId);
            
            foreach ($field->getBlockTypes() as $index => $blockType) {
                if ($blockType->id == $this->id) {
                    $this->handle = $field->handle . '-' . $index;
                    break;
                }
            }
        }

        return $this->handle;
    }
183872
protected function executeHandler()/*# : bool */
    {
        try {
            $handler = $this->result->getHandler();
            $callable = $this->getResolver()->resolve($handler);

            if ($this->result->getRoute()) {
                return $this->callableWithRoute($callable);
            } else {
                call_user_func($callable, $this->result);
                return true;
            }
        } catch (\Exception $e) {
            $this->result->setHandler(null);
            return false;
        }
    }
136790
public function buildValidator()
    {
        if ($this->validator_built) {
            return $this->validator;
        }

        foreach ($this->rows as $name => $row) {
            foreach ($row->getRules() as $rule) {
                $this->validator->addRule($name, $rule);
            }
            $row->disableRules();
        }
        $this->validator_built = true;

        return $this->validator;
    }
546889
public function build()
    {
        $options = $this->suppliedOptions;

        //set the title if it doesn't exist
        $options['title'] = $this->validator->arrayGet($options, 'title', $options['field_name']);

        //run the visible property closure if supplied
        $visible = $this->validator->arrayGet($options, 'visible');

        if (is_callable($visible)) {
            $options['visible'] = $visible($this->config->getDataModel()) ? true : false;
        }

        //run the editable property's closure if supplied
        $editable = $this->validator->arrayGet($options, 'editable');

        if (isset($editable) && is_callable($editable)) {
            $options['editable'] = $editable($this->config->getDataModel());
        }

        $this->suppliedOptions = $options;
    }
302180
public function get_handler() : handler {
        if ($this->handler === null) {
            $this->handler = handler::get_handler($this->get('component'), $this->get('area'), $this->get('itemid'));
        }
        return $this->handler;
    }
481031
public function getHandlers()
    {
        $handlers = &gplcart_static('module.ga_report.handlers');

        if (isset($handlers)) {
            return $handlers;
        }

        $handlers = gplcart_config_get(__DIR__ . '/../config/reports.php');

        foreach ($handlers as $id => &$handler) {
            $handler['id'] = $id;
        }

        $this->hook->attach('module.ga_report.handlers', $handlers);
        return $handlers;
    }
647870
protected function determineHandler()
    {
        $handler = collect($this->config->get('handlers'))
            ->map(function (string $handlerClassName) {
                if (! class_exists($handlerClassName)) {
                    throw InvalidHandler::handlerDoesNotExist($handlerClassName);
                }

                return new $handlerClassName($this->request);
            })
            ->filter(function (HandlesSlashCommand $handler) {
                return $handler->canHandle($this->request);
            })
            ->first();

        if (! $handler) {
            throw RequestCouldNotBeHandled::noHandlerFound($this->request);
        }

        return $handler;
    }
293428
public static function handlersSelectOptions()
    {
        return Yii::$app->cache->lazy(function () {
            $query = (new Query)
                ->select(['name', 'id'])
                ->from(PropertyHandlers::tableName())
                ->orderBy(['sort_order' => SORT_ASC])
                ->indexBy('id');
            $handlers = Module::getInstance()->handlersList;
            if (count($handlers) > 0) {
                $query->where(['class_name' => $handlers]);
            }
            return $query->column();
        }, 'PropertyHandlerId2Name', 86400, PropertyHandlers::commonTag());
    }
1109371
public function getActionHandlers()
    {
        $handlers = &gplcart_static('image.style.action.handlers');

        if (isset($handlers)) {
            return (array) $handlers;
        }

        $handlers = (array) gplcart_config_get(GC_FILE_CONFIG_IMAGE_ACTION);
        $this->hook->attach('image.style.action.handlers', $handlers, $this);
        return (array) $handlers;
    }
1082240
private function handleRouter()
    {
        require_once QP_APP_PATH . "routers.php";

        if (QR::hasMatched() == false) {
            echo (new \App\Controllers\IndexController)->notFoundAction();
            exit;
        }

        $matched_router_data = QR::getMatchedData();

        $ns = $matched_router_data['namespace'];
        $ctrl = $matched_router_data['controller'];
        $m = QR::getMethod();

        if (! method_exists(($ns . "\\" . $ctrl . "Controller"), $m . "Action")) {
            echo (new \App\Controllers\IndexController)->notFoundAction();
            exit;
        }

        $router = new \Phalcon\Mvc\Router();
        $router->setDefaults([
            "namespace" => $ns,
            "controller" => $ctrl,
            "action" => $m,
        ]);

        return $router;
    }
1354068
public function build()
    {
        if ($this->user->trashed()) {
            return $this->actions;
        }

        $this->checkBlocked();
        $this->checkInactive();
        $this->checkInvites();
        $this->checkPasswordReset();

        return $this->actions;
    }