public function has($key)
    {
        if (null === $key) {
            throw new Exception\InvalidArgumentException('The specified key name is null');
        }

        if (!is_scalar($key)) {
            throw new Exception\InvalidArgumentException('The specified key name must be a scalar');
        }

        return array_key_exists($key, $this->collections);
    }
public function has($key)
    {
        if (null === $key) {
            throw new Exception\InvalidArgumentException('The specified key name is null');
        }

        if (!is_scalar($key)) {
            throw new Exception\InvalidArgumentException('The specified key name must be a scalar');
        }

        return array_key_exists($key, $this->collections);
    }
public function has ( $ key ) { if ( null === $ key ) { throw new Exception \ InvalidArgumentException ( 'The specified key name is null' ) ; } if ( ! is_scalar ( $ key ) ) { throw new Exception \ InvalidArgumentException ( 'The specified key name must be a scalar' ) ; } return array_key_exists ( $ key , $ this -> collections ) ; }
Whether this contains the given name. More formally, returns true if and only if this contains at least
one element.

@param string|int $key

@return bool
@throws \Xloit\Collection\Exception\InvalidArgumentException
Whether this contains the given name . More formally returns true if and only if this contains at least one element .