Get particular option
@param  mixed $value
@return Option
@throws DataGridColumnStatusException
961684
public function getOption($value)
	{
		foreach ($this->options as $option) {
			if ($option->getValue() === $value) {
				return $option;
			}
		}

		throw new DataGridColumnStatusException("Option [$value] does not exist");
	}
165930
public function val($value = null)
    {
        if (!$this->isNull($value)) {
            $this->value = $value;

            return $this;
        }

        return $this->getDateObject()->format($this->format);
    }
428167
protected function prepareValue($value)
    {
        $params = $this->getOperatorParams();
        $method = $params['method'];
        switch ($method) {
            case 'where':
            case 'whereNull':
            case 'whereNotNull':
                break;
            case 'whereBetween':
            case 'whereNotBetween':
                if (! is_array($value)) {
                    $value = explode(',', $value, 2);
                }
                break;
            case 'whereIn':
            case 'whereNotIn':
                if (! is_array($value)) {
                    $value = explode(',', $value);
                }
                break;
        }

        return $value;
    }
968680
public function getTypeFromValue($value = null)
    {
        $value = ($value === null ? $this->value : $value);
        return array_search($value, self::$typeList);
    }
786262
public static function fromValue($value) : Type
    {
        switch (gettype($value)) {
            case 'string':
                return Text::long();

            case 'integer':
                return Integer::big();

            case 'double':
                return new Decimal(30, 15);

            case 'boolean':
                return new Boolean();

            case $value instanceof \DateTimeInterface:
                return new DateTime();

            default:
                throw InvalidArgumentException::format(
                        'Invalid call to %s: unknown value type \'%s\' given',
                        __METHOD__, gettype($value)
                );
        }
    }
858208
public function value( $value = NULL ){
		if( is_null( $value ) )
			return $this->value;
		$this->value	= $value;
	}
1102362
private function getPdoDataType($value)
	{
		$result = \PDO::PARAM_STR;

		if (is_bool($value)) {
			$result = \PDO::PARAM_BOOL;
		} elseif (is_null($value)) {
			$result = \PDO::PARAM_NULL;
		} elseif (is_int($value)) {
			$result = \PDO::PARAM_INT;
		}

		return $result;
	}
821699
private function getValue($value)
    {
        if ($value === null) {
            return null;
        }

        if ($value instanceof String_ || $value instanceof LNumber || $value instanceof DNumber) {
            return $value->value;
        } elseif ($value instanceof ConstFetch) {
            $value = (string)$value->name;
            if ($value === 'null') {
                return null;
            } elseif ($value === 'true') {
                return true;
            } elseif ($value === 'false') {
                return false;
            }

            return $value;
        } elseif ($value instanceof Array_) {
            return $this->getArray($value);
        }

        return null;
    }
1363813
public function value($value = null)
    {
        $element = clone $this;

        $element->value = $value;

        $element->applyValueToOptions();

        return $element;
    }
776248
public function selectByValue($value)
	{
		$options = $this->getOptionsByValue($value);

		if ( !$options ) {
			throw new SelectException('Cannot locate option with value: ' . $value, SelectException::TYPE_NOT_FOUND);
		}

		return $this->selectOptions($options, !$this->isMultiple());
	}
603211
public function get($value) {

		return isset($this->items[$value]) ? $this->items[$value] : NULL;

	}
913981
public static function getValue($value)
    {
        if (is_string($value)) {
            return static::escapeText($value);
        }
        if (is_bool($value)) {
            return static::getBoolean($value);
        }
        if (is_array($value)) {
            return static::getArray($value);
        }
        return $value;
    }
1283129
public static function get($value): self
    {
        $class = get_called_class();

        if ($value instanceof self) {
            $value = $value->value();
        }

        if (!static::has($value)) {
            throw EnumException::invalidEnumValue($class, $value);
        }

        return static::all()[$value];
    }
546050
public function fetchRow($column, $value)
    {
        $where = array($column, $value);

        return $this->tableGateway->select($where)->current();
    }
239416
protected function getValueType($value)
    {
        switch (true) {
            case is_scalar($value):
                $type = gettype($value);
                break;

            case is_array($value):
                $type = 'array';
                break;

            case is_object($value):
                $type = get_class($value);
                break;

            case is_resource($value):
                $type = 'resource';
                break;

            default:
                $type = 'unknown';
                break;
        }

        return $type;
    }
1290149
public static function fromString($value, array $formats = [])
	{
		$formats = array_merge($formats, [
			'Y-m-d H:i:s.u',
			'Y-m-d H:i:s',
			'Y-m-d',
			'j. n. Y G:i:s',
			'j. n. Y G:i',
			'j. n. Y',
			'U',
		]);

		if ($value instanceof \DateTime) {
			return $value;
		}

		if ($value instanceof \DateTimeImmutable) {
			$date = new \DateTime('now', $value->getTimezone());
			$date->setTimestamp($value->getTimestamp());

			return $date;
		}

		foreach ($formats as $format) {
			if (!is_string($format) || !$date = \DateTime::createFromFormat($format, $value)) {
				continue;
			}

			return $date;
		}

		$timestamp = strtotime($value);

		if ($timestamp !== false) {
			$date = new \DateTime;
			$date->setTimestamp($timestamp);

			return $date;
		}

		throw new DataGridDateTimeHelperException;
	}
109729
public static function getTypeValueFromObject( $value )
	{
		if ( $value instanceof XPath2Item )
		{
			return $value->getValueType();
		}

		if ( is_null( $value ) )
		{
			return Types::$NullType;
		}

		if ( is_array( $value ) )
		{
			return Types::$ArrayType;
		}

		if ( $value instanceof \DateTime )
		{
			return Types::$DateTimeValueType;
		}

		if ( is_bool( $value ) || $value instanceof FalseValue || $value instanceof TrueValue )
		{
			return Types::$BooleanType;
		}

		if ( is_string( $value ) )
		{
			return Types::$StringType;
		}

		if ( is_object( $value ) )
		{
			// if ( $value instanceof DateTimeInterval )
			// {
			// 	return Types::$DateTimeIntervalType;
			// }

			if ( $value instanceof DecimalValue )
			{
				return Types::$DecimalType;
			}

			if ( $value instanceof Long )
			{
				return Types::$LongType;
			}

			if ( $value instanceof DayTimeDurationValue )
			{
				return Types::$DayTimeDurationValueType;
			}

			if ( $value instanceof YearMonthDurationValue )
			{
				return Types::$YearMonthDurationValueType;
			}

			if ( $value instanceof UntypedAtomic )
			{
				return Types::$UntypedAtomicType;
			}

			if ( $value instanceof DurationValue )
			{
				return Types::$DurationValueType;
			}

			if ( $value instanceof GYearMonthValue )
			{
				return Types::$GYearMonthValueType;
			}

			if ( $value instanceof GYearValue )
			{
				return Types::$GYearValueType;
			}

			if ( $value instanceof GMonthValue )
			{
				return Types::$GMonthValueType;
			}

			if ( $value instanceof GMonthDayValue )
			{
				return Types::$GMonthDayValueType;
			}

			if ( $value instanceof GDayValue )
			{
				return Types::$GDayValueType;
			}

			if ( $value instanceof QNameValue )
			{
				return Types::$QNameValueType;
			}

			if ( $value instanceof HexBinaryValue )
			{
				return Types::$HexBinaryValueType;
			}

			if ( $value instanceof Base64BinaryValue )
			{
				return Types::$Base64BinaryValueType;
			}

			if ( $value instanceof IDREFSValue )
			{
				return Types::$IDREFSValueType;
			}

			if ( $value instanceof NMTOKENSValue )
			{
				return Types::$NMTOKENSValueType;
			}

			if ( $value instanceof ENTITIESValue )
			{
				return Types::$ENTITIESValueType;
			}

			$className = get_class( $value );

			if ( $className == Types::$NullType->getFullName() )
			{
				return Types::$NullType;
			}

			if ( $className == Types::$AnyUriValueType->getFullName() )
			{
				return Types::$AnyUriValueType;
			}

			if ( $className == Types::$UNION->getFullName() )
			{
				return Types::$UNION;
			}

			else if ( $className == Types::$BoolType->getFullName() )
				return Types::$BooType;
			else if ( $className == Types::$BooleanType->getFullName() )
				return Types::$BooleanType;
			else if ( $className == Types::$CharType->getFullName() )
				return Types::$CharType;
			else if ( $className == Types::$SByteType->getFullName() )
				return Types::$SByteType;
			else if ( $className == Types::$ByteType->getFullName() )
				return Types::$ByteType;
			else if ( $className == Types::$Int16Type->getFullName() )
				return Types::$Int16Type;
			else if ( $className == Types::$ShortType->getFullName() )
				return Types::$ShortType;
			else if ( $className == Types::$UInt16Type->getFullName() )
				return Types::$UInt16Type;
			else if ( $className == Types::$Int32Type->getFullName() )
				return Types::$Int32Type;
			else if ( $className == Types::$IntType->getFullName() )
				return Types::$IntType;
			else if ( $className == Types::$UInt32Type->getFullName() )
				return Types::$UInt32Type;
			else if ( $className == Types::$Int64Type->getFullName() )
				return Types::$Int64Type;
			else if ( $className == Types::$LongType->getFullName() )
				return Types::$LongType;
			else if ( $className == Types::$UInt64Type->getFullName() )
				return Types::$UInt64Type;
			else if ( $className == Types::$FloatType->getFullName() )
				return Types::$FloatType;
			else if ( $className == Types::$DoubleType->getFullName() )
				return Types::$DoubleType;
			else if ( $className == Types::$DateTimeIntervalType->getFullName() )
				return Types::$DateTimeIntervalType;
			else if ( $className == Types::$DecimalType->getFullName() )
				return Types::$DecimalType;
			else if ( $className == Types::$TimeValueType->getFullName() )
				return Types::$TimeValueType;
			else if ( $className == Types::$DateValueType->getFullName() )
				return Types::$DateValueType;
			else if ( $className == Types::$DateTimeValueType->getFullName() )
				return Types::$DateTimeValueType;
			else if ( $className == Types::$StringType->getFullName() )
				return Types::$StringType;
			else if ( $className == Types::$ArrayType->getFullName() )
				return Types::$ArrayType;
			else if ( $className == Types::$ObjectType->getFullName() )
				return Types::$ObjectType;
			else if ( $className == Types::$ArrayType->getFullName() )
				return Types::$ArrayType;
			else if ( $className == Types::$IntegerType->getFullName() )
				return Types::$IntegerType;

			return Type::FromNameAndTypeCode( $className, TypeCode::Object );
		}

		if ( is_double( $value ) || NAN . "" == strtoupper( $value ) )
		{
			return Types::$DoubleType;
		}

		if ( is_int( $value ) )
		{
			return Types::$IntType;
		}

	}