Returns the position of the given value in the collection. Returns null if the given value couldn't be found.
@param mixed  $value
@return int|null
506230
function indexOf($value) {
        $i = 0;
        
        foreach($this->data as $val) {
            if($val === $value) {
                return $i;
            }
            
            $i++;
        }
        
        return null;
    }
968680
public function getTypeFromValue($value = null)
    {
        $value = ($value === null ? $this->value : $value);
        return array_search($value, self::$typeList);
    }
771525
public function getOptionByValue($value)
    {
        // walk all options
        foreach ($this->options as $option) {
            if ($option instanceof Option) {
                if ($option->getValue() == $value) {
                    return $option;
                }
            } else {
                if ($option instanceof Optgroup) {
                    $options = $option->getOptions();
                    foreach ($options as $option2) {
                        if ($option2->getValue() == $value) {
                            return $option2;
                        }
                    }
                }
            }
        }

        return null;
    }
1319475
protected function getValue( $key, $value = null )
	{
		if( is_null( $value ) && isset( $this->args[$key] )) {
			$value = $this->args[$key];
		}
		return $value;
	}
33192
public function get($value) {
        //TODO throw exception instead?!
        if (\is_int($value)) {
            $info = $this->getIndexAndMask($value);
            $i = $info["i"];
            $k = $info["k"];

            $flag = 1;
            $flag = $flag << $k;

            if (isset($this->array[$i])) return (($this->array[$i] & $flag) !== 0);
            return false;
        }
        return false;
    }
303441
public static function getText($value)
    {
        $enumItem = EnumParser::getInstance()->getEnumItem(static::class, $value);
        if($enumItem)
        {
            return $enumItem->text;
        }
        else
        {
            return null;
        }
    }
1228025
public function reverseTransform($value)
    {
        if (null === $value) {
            return null;
        }

        $repo = $this->em->getRepository($this->className);
        $entity = $repo->find($value);

        if (!$entity) {
            return null;
        }

        return $entity;
    }
1080327
public static function integer($value){

		$value = static::_nullValue($value);

		if($value !== null){

			$value = (int) $value;
		}

		return $value;
	}
1027275
public function indexOf($value)
    {
        $count = $this->count();
        for ($i = 0; $i < $count; ++$i) {
            if ($value === $this->source[$i]) {
                return $i;
            }
        }
        throw new OutOfBoundsException("Value $value not found");
    }
50437
private function valueRetriever($value)
    {
        if ($this->useAsCallable($value)) {
            return $value;
        }

        return function ($item) use ($value) {
            if ($value === null) {
                return $item;
            }

            $item = (array)$item;
            return isset($item[$value]) ? $item[$value] : null;
        };
    }
1021290
public function second($value = null)
    {
        if ($value !== null) {
            if ($value > 59 || $value < 0) {
                $this->second = 0;
            } else {
                $this->second = $value;
            }
        }
        return $this->second;
    }
1248546
static function findKey($value): ?string
    {
        return self::hasValue($value)
            ? self::$valueToKeyMap[static::class][$value]
            : null;
    }
87414
public static function fromValue($value)
    {
        foreach (static::values() as $key => $enumInstance) {
            if ($enumInstance->getValue() === $value) {
                return $enumInstance;
            }
        }

        return null;
    }
64514
public function push ($value)
	{
		if (is_an_array($value) && !($value instanceof \Sauce\SObject)) {
			foreach ($value as $v) {
				$this->push($v);
			}

			return null;
		}

		$this->storage []= $value;

		return null;
	}
812756
public function transform($value)
    {
        if (null === $value) {
            return null;
        }

        if (!$value instanceof APILocation) {
            throw new TransformationFailedException('Expected a ' . APILocation::class . ' object.');
        }

        return $value->id;
    }
1244339
public function lists($value)
    {
        return array_map(function ($item) use ($value) {
            return isset($item[$value]) ? $item[$value] : null;
        }, $this->items);
    }
911565
public function search( $value )
	{
		if( $value == $this->value )
			return $this;
		else if( $value < $this->value )
		{
			if( $this->left )
				return $this->left->search( $value );
		}
		else if( $value > $this->value )
		{
			if( $this->right )
				return $this->right->search( $value );
		}
		return NULL;
	}