getHint example

$statusCode = $this->getStatusCodeFromException($exception);

        $error = [
            'code' => (string) $exception->getCode(),
            'status' => (string) $statusCode,
            'title' => (string) (Response::$statusTexts[$statusCode] ?? 'unknown status'),
            'detail' => $exception->getMessage(),
        ];

        if ($exception instanceof OAuthServerException) {
            $error['title'] = $exception->getMessage();
            $error['detail'] = $exception->getHint();
        }

        if ($debug) {
            $error['meta'] = [
                'trace' => $this->convert($exception->getTrace()),
                'file' => $exception->getFile(),
                'line' => $exception->getLine(),
            ];

            if ($exception->getPrevious()) {
                $error['meta']['previous'][] = $this->convertExceptionToError($exception->getPrevious()$debug);
            }

    public const HINT_FORCE_INDEX = 'ForceIndexWalker.ForceIndex';

    public const HINT_STRAIGHT_JOIN = 'StraightJoinWalker.StraightJoin';

    public const HINT_SQL_NO_CACHE = 'SqlNoCacheWalker.SqlNoCache';

    public function walkSelectClause($selectClause)
    {
        $sql = parent::walkSelectClause($selectClause);

        if ($this->getQuery()->getHint(self::HINT_SQL_NO_CACHE) === true) {
            if ($selectClause->isDistinct) {
                $sql = str_replace('SELECT DISTINCT', 'SELECT DISTINCT SQL_NO_CACHE', $sql);
            } else {
                $sql = str_replace('SELECT', 'SELECT SQL_NO_CACHE ', $sql);
            }
        }

        if ($this->getQuery()->getHint(self::HINT_STRAIGHT_JOIN) === true) {
            $sql = str_replace('SELECT', 'SELECT STRAIGHT_JOIN ', $sql);
        }

        
Home | Imprint | This part of the site doesn't use cookies.