Существует ли элемент на данной позиции

@param int $offser позиция
@return bool
541066
public function offsetExists($offset) {
		$this->getElements();
        return isset($this->elements[$this->getPosition($offset)]);
    }
211860
private function _validateUrl($url)
    {
        $parsed = parse_url($url);
        if (empty($parsed['scheme'])
            || empty($parsed['host'])
            || $parsed['scheme'] !== 'https'
            || substr($url, -4) !== '.pem'
            || !preg_match($this->defaultHostPattern, $parsed['host'])
        ) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                'The certificate is located on an invalid domain.'
            );
        }
    }
1329699
protected function hasExtension(FileDescriptorProto $fileDescriptor)
    {
        $messages     = $fileDescriptor->getMessageTypeList();
        $hasExtension = $fileDescriptor->hasExtensionList();

        if ($hasExtension) {
            return true;
        }

        if ($messages === null) {
            return false;
        }

        foreach ($messages as $message) {
            if ($message->hasExtensionList()) {
                return true;
            }
        }

        return false;
    }
1069373
public function offsetExists($offset) : bool
    {
        return ( isset($this->_Container[$offset]) || ($this->_DataHandler !== null && $this->_DataHandler->selectOneEntity($offset) !== false) ) ? true : false ;
    }
1256688
public function unregisterChecker(CheckerInterface $checker)
    {
        if (false === $this->hasChecker($checker)) {
            throw new \LogicException('Trying to unregister unregistered checker');
        }

        foreach ($this->checkers as $key => $registeredChecker) {
            if ($checker === $registeredChecker) {
                unset($this->checkers[$key]);
            }
        }

        return $this;
    }
274625
private function validate_helper_input( $helper ) {
		if ( ! is_array( $helper ) || empty( $helper ) ) {
			return false;
		}

		if ( !  isset( $helper[ 'name' ] ) || ! isset( $helper[ 'class' ]  ) ) {
			return false;
		}

		//if not set, set callback name to "helper"
		if ( ! isset( $helper[ 'callback' ] ) ) {
			$helper[ 'callback' ] = 'helper';
		}

		return $helper;

	}
417551
public function hasDescriptor($descriptor, $value = null)
    {
        $this->loadDescriptors();

        $exists = array_key_exists($descriptor, $this->descriptors);

        if (false === $exists) {
            return false;
        }

        if (null === $value) {
            return true;
        }

        $descriptorValue = $this->descriptors[$descriptor];

        // normalize
        if ($descriptorValue === 'true') {
            $descriptorValue = true;
        }
        if ($descriptorValue === 'false') {
            $descriptorValue = false;
        }

        if ($value === $descriptorValue) {
            return true;
        }

        return false;
    }
1335498
public static function isExitNode($ip) {
        self::init();
        if (!is_string($ip)) throw new IllegalTypeException('Illegal type of parameter $ip: '.gettype($ip));

        // TODO: mit Filter-Extension lokale Netze abfangen
        if ($ip == '127.0.0.1')
            return false;

        $nodes = self::getExitNodes();
        return isset($nodes[$ip]);
    }
993612
public function required($options) {
        if ((is_array($options) || (!is_array($options) && $options))) {
            if ((is_array($this->elementData) && (empty($this->elementData) || (empty($this->elementData[0]) && count($this->elementData) === 1))) ||
                    (!is_array($this->elementData) && trim($this->elementData) === '')) {
                if (is_bool($options))
                    $this->addError('Field is required');
                else if (is_array($options) && isset($options['message'])) {
                    $this->addError($options['message']);
                } else
                    $this->addError((!is_array($options) && !is_object($options)) ? $options : 'Field is required');
                return false;
            }
            return true;
        }
        return true;
    }
738691
public static function config($adapter, $options = []) {
		$_this = static::getInstance();

		if (!empty($adapter) && !empty($options)) {
			return $_this->_adapterConfig[$adapter] = $options;
		}

		if (isset($_this->_adapterConfig[$adapter])) {
			return $_this->_adapterConfig[$adapter];
		}

		return false;
	}
546067
public static function onlyOffline()
    {

        $instance = new static;

        $column = $instance->getQualifiedStatusColumn();

        return $instance->withoutGlobalScope(StatusScope::class)->where($column, false);
    }
1087862
public static function isEnabled(string $adapter): bool
    {
        $config = static::getConfig();

        if (!$config->has($adapter)) {
            return false;
        }

        $enabled = $config->getArrayItem($adapter, 'enabled');
        if ($enabled === null) {
            return false;
        }

        return (bool)$enabled;
    }
1069956
public function hasConfig($aliasOrClass)
        {
            $key = ($this->hasAlias($aliasOrClass)) ? 'alias:' . $this->getBaseAlias($aliasOrClass) : $aliasOrClass;

            if (!isset($this->configurations[$key])) {
                return false;
            }

            if ($this->configurations[$key] === $this->configurationTemplate) {
                return false;
            }

            return true;
        }
271286
public function is_valid(bool $dns=false) {
		return ! \is_null($this->host) && (! $dns || $this->has_dns());
	}
838749
public function isValid($sendHeaders = true)
    {

        app(\Antares\Html\Adapter\CustomfieldAdapter::class)->adapt($this->grid);
        $decryptedKey = is_null($key          = Input::get('key')) ? null : Crypt::decrypt($key);


        if ($this->grid->ajaxable !== false && !$this->container->make('antares.request')->shouldMakeApiResponse()) {
            $clientScript = $this->clientScript->addClientValidation($this->grid);
            $fieldsets    = $clientScript['fieldsets'];
            $this->fieldPermissionAdapter->resolveFields($fieldsets, $decryptedKey);

            $this->rules($fieldsets);
        } else {

            $fieldsets = $this->grid->fieldsets();
            $this->fieldPermissionAdapter->resolveFields($fieldsets, $decryptedKey);

            $this->rules($fieldsets);
        }
        $validator        = $this->validator->with($this->grid);
        $validator->withCustomFields($this->customFieldsValidator);
        $result           = $validator->validate($sendHeaders);
        $this->messageBag = $validator->getMessageBag();
        return $result;
    }
918519
public function acceptTrade(TradeOffer $tradeOffer)
    {
        if (!$tradeOffer->isOurOffer()) {
            $url = 'https://steamcommunity.com/tradeoffer/' . $tradeOffer->getTradeOfferId() . '/accept';
            $referer = 'https://steamcommunity.com/tradeoffer/' . $tradeOffer->getTradeOfferId() . '/';
            $params = [
                'sessionid' => $this->steamCommunity->getSessionId(),
                'serverid' => '1',
                'tradeofferid' => $tradeOffer->getTradeOfferId(),
                'partner' => Helper::toCommunityID($tradeOffer->getOtherAccountId())
            ];
            $response = $this->steamCommunity->cURL($url, $referer, $params);
            $json = json_decode($response, true);
            if (is_null($json)) {
                return false;
            } else {
                return isset($json['tradeid']);
            }
        }
        return false;
    }
1360708
public function acquire(bool $blocker = false): bool
    {
        if (!is_resource($this->lock)) {
            return false;
        }

        return flock($this->lock, ($blocker) ? LOCK_EX : LOCK_EX | LOCK_NB);
    }