public function getLast()
    {
        if (0 === $this->count()) {
            return null;
        }

        end($this->data);

        return current($this->data);
    }
public function getLast()
    {
        if (0 === $this->count()) {
            return null;
        }

        end($this->data);

        return current($this->data);
    }
public function getLast ( ) { if ( 0 === $ this -> count ( ) ) { return null ; } end ( $ this -> data ) ; return current ( $ this -> data ) ; }
Get the last element in the collection

@return mixed
Get the last element in the collection