Whether this provider can handle given request (usually a check based on table, uid and context)

@return bool
493499
public function canHandle(): bool
    {
        if ($this->table !== 'pages') {
            return false;
        }

        if (!$this->backendUser->isAdmin()) {
            return false;
        }

        /** @var $rootPageResolver RootPageResolver */
        $rootPageResolver = GeneralUtility::makeInstance(RootPageResolver::class);
        return $rootPageResolver->getIsRootPageId((int)$this->identifier);
    }
669876
public function hasPhpConfigIssue()
    {
        foreach ($this->requirements as $req) {
            if (!$req->isFulfilled() && $req instanceof PhpConfigRequirement) {
                return true;
            }
        }

        return false;
    }
1229420
public function canAddrequest()
    {
        if (!$this->actor) {
            return false;
        }

        if (!$this->getItem()) {
            return false;
        }

        return $this->getItem()->authorize('requester', array('viewer' => $this->actor));
    }
772627
public function handleCallbackStatus() {
    // Read the body of the request
    $body = @file_get_contents('php://input');

    if ($body != null && strlen(trim($body)) > 0) {
      $status = json_decode(trim($body), false);

      if ($status != null && is_object($status)) {
        $this->initStatus($status);

        return true;
      }
    }

    return false;
  }
134822
public function canRequest(RequestInterface $request, array $options = []) : bool
    {
        $groupCanRequest = true;
        $this->_requestLimiters->rewind();
        while ($this->_requestLimiters->valid())
        {
            /** @var RequestLimiter $requestLimiter */
            $requestLimiter = $this->_requestLimiters->current();

            $canRequest = $requestLimiter->canRequest($request, $options);
            if ($groupCanRequest && !$canRequest)
            {
                $groupCanRequest = false;
                $this->_retryAfter = $requestLimiter->getRemainingSeconds();
            }

            $this->_requestLimiters->next();
        }

        return $groupCanRequest;
    }
1089947
public function checkRegistryRequestsAnswers()
    {
        if (! (($this->db instanceof \Zend_Db_Adapter_Abstract) && ($this->session instanceof \Zend_Session_Namespace))) {
            return false;
        }

        // Checks if this is the current user
        if (! $this->_vars instanceof \Zend_Session_Namespace) {
            $sessionStore = $this->session;

            $notCurrent = true;
            foreach (array('user_id', 'user_organization_id') as $key) {
                if ($sessionStore->__isset($key) && $this->_vars->offsetExists($key)) {
                    $notCurrent = $sessionStore->__get($key) != $this->_vars->offsetGet($key);
                } else {
                    $notCurrent = $sessionStore->__isset($key) || $this->_vars->offsetExists($key);
                }

                if ($notCurrent) {
                    break;
                }
            }
            if (! $notCurrent) {
                // When this is the case, use the \Zend_Session_Namespace object with the current set values
                // This way changes to this user object are reflected in the CurrentUser object and vice versa.
                $this->setAsCurrentUser();
            }
        }

        // Change a numeric role id to it's string value
        $this->_getRole('user_role');
        if ($this->_hasVar('current_user_role')) {
            $this->_getRole('current_user_role');
        }

        return (boolean) $this->acl && $this->userLoader;
    }
1090018
public function canSave()
    {
        if($this->getRequest()->getFormat() == 'html')
        {
            if($this->getModel()->getState()->isUnique())
            {
                if($this->canEdit() && !$this->isLocked()) {
                    return true;
                }
            }
            else
            {
                if($this->canAdd()) {
                    return true;
                }
            }
        }

        return false;
    }
212313
public function canProcess()
    {
        if ($this->persisted()) {
            return false;
        }

        if (!$this->_subscriber) {
            return false;
        }

        if (!$this->validateEntity()) {
            return false;
        }

        if (!$this->_subscriber->persisted() && !$this->_subscriber->validateEntity()) {
            return false;
        }

        if (!isset($this->_package)) {
            return false;
        }

        if (!isset($this->_payment_method)) {
            return false;
        }

        return true;
    }
1356084
protected function hasUsers()
    {
        try {
            $users = $this->app['users']->getUsers();
            if (empty($users)) {
                return false;
            }

            return true;
        } catch (TableNotFoundException $e) {
            return false;
        }
    }
711130
public function isProtected()
    {
        if (isset($this->middleware['api.auth']) || in_array('api.auth', $this->middleware)) {
            if ($this->controller && isset($this->middleware['api.auth'])) {
                return $this->optionsApplyToControllerMethod($this->middleware['api.auth']);
            }

            return true;
        }

        return false;
    }
1066379
public function checkRegistryRequestsAnswers()
    {
        if ($this->_gemsData) {
            if ($this->currentUser instanceof \Gems_User_User) {
                $this->_gemsData = $this->currentUser->applyGroupMask($this->_gemsData);
            }
        } else {
            if ($this->db instanceof \Zend_Db_Adapter_Abstract) {
                $this->refresh();
            } else {
                return false;
            }
        }

        return $this->exists;
    }
1285632
public function canProcessRequest()
    {
        // Check the validity of the class name
        if(($this->sRequestedClass !== null && !$this->validateClass($this->sRequestedClass)) ||
            ($this->sRequestedMethod !== null && !$this->validateMethod($this->sRequestedMethod)))
        {
            $this->sRequestedClass = null;
            $this->sRequestedMethod = null;
        }
        return ($this->sRequestedClass !== null && $this->sRequestedMethod !== null);
    }
239547
public function isCmsApiRequest()
    {
        if (app()->runningInConsole() || ! $this->isCmsApiEnabled()) {
            return false;
        }

        return $this->requestRouteMatchesPrefix($this->getCmsApiRoutePrefix());
    }
745659
private function canDebug()
    {
        // check if debug header exists
        if (!$this->request->matchHeader(self::H_DEBUG)) {
            return false;
        }

        if ($this->controlKey == '') {
            return true; // everybody can debug
        }

        // only users with valid control key can debug
        if ($this->request->matchHeader(self::H_CKEY, $this->controlKey)) {
            return true;
        }

        return false;
    }
218520
private function isRequestCacheEnabled()
    {
        if (!$this->requestCache) {
            return false;
        }

        return $this->config->get('requestCache')->get('enabled') && $this->getCacheKey() !== null;
    }
83420
public static function canBeUsedForRequest(Request $request)
    {
        return $request->has(self::CHUNK_NUMBER_INDEX) && $request->has(self::TOTAL_CHUNKS_INDEX) &&
            $request->has(self::CHUNK_UUID_INDEX);
    }
814030
public function isAcceptable(Request $request)
    {
        if ($request->isXmlHttpRequest()) {
            return true;
        }

        $acceptHeader = AcceptHeader::fromString($request->headers->get('Accept'));
        if ($acceptHeader->has('application/json')) {
            return true;
        }

        return false;
    }