Checks if it has the specified option and returns it value or true.

@param string $key     the key to be checked
@param bool   $getExpr Gets the expression instead of the value.
The value is the processed form of the expression.

@return mixed
180804
public function has($key, $getExpr = false)
    {
        foreach ($this->options as $option) {
            if (is_array($option)) {
                if (! strcasecmp($key, $option['name'])) {
                    return $getExpr ? $option['expr'] : $option['value'];
                }
            } elseif (! strcasecmp($key, $option)) {
                return true;
            }
        }

        return false;
    }
1332200
public function get( $key, $default = null ) {
		$value = get_option( $this->option_key( $key ) );

		if ( false === $value ) {
			return $default;
		}

		return $value;
	}
1296988
function has($key)
    {
        \Poirot\Storage\assertKey($key);


        $realm = $this->getRealm();

        try {

            $sql = "SELECT COUNT(*) as has_key FROM `KVStore` WHERE `realm` = '$realm' and `key` = '$key';";
            $stm = $this->pdo->prepare($sql);
            $stm->execute();
            $stm->setFetchMode(\PDO::FETCH_ASSOC);

            $count = $stm->fetch();
            $count = (int) $count['has_key'];

        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }

        return ($count > 0);
    }
585230
public function getOption($key)
    {
        if (!isset($this->options[$key])) {
            throw InvalidOptionException::build([], ['option' => $key]);
        }

        return $this->options[$key];
    }
1200904
public function getProjectOptionByKey($key)
    {
        $options = $this->getProjectOptions();

        if (!isset($options[$key])) {
            return false;
        }

        return $options[$key];
    }
267077
public function get($key)
    {
        $bucket = $this->locate($key);

        if ($bucket === null) {
            $message = sprintf('Key not found: %s', VarPrinter::toString($key));
            throw new KeyException($message);
        }

        return $bucket->value();
    }
645609
@SuppressWarnings("unchecked")
    public final BooleanExpression contains(Expression<K> key, Expression<V> value) {
        return get(key).eq((Expression) value);
    }
1002567
public function get($key)
    {
        $value = $this->apc->get($this->prefix.$key);

        if ($value !== false) {
            return $value;
        }
    }
1347008
protected function readOption(string $key, $fallback = null)
    {
        $value = get_option($this->prefix . $key, $fallback ?? false);
        if (false === $value) {
            return $fallback;
        }

        return $value;
    }
92669
protected function _setOneProperty($key, $value = null, $expr = false)
        {
            if (!Arrays::is($key)) {
                $key = array($key => $value);
            }

            foreach ($key as $field => $value) {
                $this->_data[$field] = $value;
                $this->_dirty_fields[$field] = $value;

                if (false === $expr and isset($this->_expr_fields[$field])) {
                    unset($this->_expr_fields[$field]);
                } else if (true === $expr) {
                    $this->_expr_fields[$field] = true;
                }
            }

            return $this;
        }
1253725
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

        $value = apc_fetch($this->prefix() . $key);

        return false === $value ? null : unserialize($value);
    }
82342
public function getOption($key) {
        if (array_key_exists($key, $this->_options)) {
            return $this->_options[$key];
        }
        throw new Garp_Browsebox_Exception('Undefined key given: '.$key);
    }
15148
function get($key, $default = null)
    {
        $value = null;
        try {
            $value = $this->client->get($this->_getKey($key));
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }

        return (empty($value))
            ? $default
            : $this->getDataInterchange()->retrieveBackward($value);
    }
1166692
protected function toExpr(Key $expr)
    {
        $left = $expr->getKey();
        $paramName = uniqid('K');

        if (strpos($left, '.') !== false) {
            $left = $this->shouldJoin($left);
        } else {
            $left = $this->getRootAlias().'.'.$left;
        }

        $comparator = $expr->getExpression();

        if ($comparator instanceof StartsWith) {
            $right = $comparator->getAcceptedPrefix();
        } elseif($comparator instanceof EndsWith){
            $right = $comparator->getAcceptedSuffix();
        } else {
            $right = $comparator->getComparedValue();
        }

        if ($comparator instanceof ConstraintInterface) {
            $left = $comparator->getLeft($left);
        }

        $this->qb->setParameter($paramName, $right);

        if ($comparator instanceof NotEquals) {
            return $this->qb->expr()->neq($left, ':'.$paramName);
        } elseif ($comparator instanceof GreaterThan) {
            return $this->qb->expr()->gt($left, ':'.$paramName);
        } elseif ($comparator instanceof GreaterThanEqual) {
            return $this->qb->expr()->gte($left, ':'.$paramName);
        } elseif ($comparator instanceof LessThan) {
            return $this->qb->expr()->lt($left, ':'.$paramName);
        } elseif ($comparator instanceof LessThanEqual) {
            return $this->qb->expr()->lte($left, ':'.$paramName);
        } elseif ($comparator instanceof StartsWith) {
            $this->qb->setParameter($paramName, $right.'%');
            return $this->qb->expr()->like($left, ':'.$paramName);
        } elseif ($comparator instanceof EndsWith) {
            $this->qb->setParameter($paramName, '%'.$right);
            return $this->qb->expr()->like($left, ':'.$paramName);
        } elseif ($comparator instanceof Contains) {
            $this->qb->setParameter($paramName, '%'.$right.'%');
            return $this->qb->expr()->like($left,':'.$paramName);
        } elseif ($comparator instanceof In) {
            if (is_array($right)) {
                return $this->qb->expr()->in($left,':'.$paramName);
            } else {
                $this->qb->setParameter($paramName, '%'.$right.'%');
                return $this->qb->expr()->like($left,':'.$paramName);
            }
        }

        return $this->qb->expr()->eq($left, ':'.$paramName);
    }
732288
public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new UnexpectedValueException(sprintf('Unknown key %s.', $key));
        }

        return $this->offsetGet($key);
    }
734796
public function has($key)
    {
        if (!is_string($key)) {
            throw new \InvalidArgumentException(htmlspecialchars(
                "Get function only accepts strings. Input was: $key."
            ));
        }

        return isset($this->services[ $key ]) || isset($this->instances[ $key ]);
    }
570528
protected function getOption($key)
    {
        if (!isset($this->options[$key])) {
            return null;
        }

        return $this->options[$key];
    }