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

        if (!$this->has($index)) {
            throw new Exception\OutOfBoundsException(sprintf('Index "%s" is out of bounds', $index));
        }

        return $this->collections[$index];
    }
public function get($index)
    {
        if (null === $index) {
            throw new Exception\InvalidArgumentException('The specified key name is null');
        }

        if (!$this->has($index)) {
            throw new Exception\OutOfBoundsException(sprintf('Index "%s" is out of bounds', $index));
        }

        return $this->collections[$index];
    }
public function get ( $ index ) { if ( null === $ index ) { throw new Exception \ InvalidArgumentException ( 'The specified key name is null' ) ; } if ( ! $ this -> has ( $ index ) ) { throw new Exception \ OutOfBoundsException ( sprintf ( 'Index "%s" is out of bounds' , $ index ) ) ; } return $ this -> collections [ $ index ] ; }
Returns the element at the specified key name in this class.

@param string|int $index

@return mixed
@throws \Xloit\Collection\Exception\InvalidArgumentException
@throws \Xloit\Collection\Exception\OutOfBoundsException
Returns the element at the specified key name in this class .