public function getRow($id = null)
    {
        if ($this->isDetached) {
            if ($id !== null) {
                throw new InvalidArgumentException('Argument $id in Result::getRow method cannot be passed when Result is in detached state.');
            }
            $id = self::DETACHED_ROW_ID;
        } elseif ($id === null) {
            throw new InvalidArgumentException('Argument $id in Result::getRow method must be passed when Result is in attached state.');
        }
        if (!isset($this->data[$id])) {
            return null;
        }
        return new Row($this, $id);
    }
public function getRow($id = null)
    {
        if ($this->isDetached) {
            if ($id !== null) {
                throw new InvalidArgumentException('Argument $id in Result::getRow method cannot be passed when Result is in detached state.');
            }
            $id = self::DETACHED_ROW_ID;
        } elseif ($id === null) {
            throw new InvalidArgumentException('Argument $id in Result::getRow method must be passed when Result is in attached state.');
        }
        if (!isset($this->data[$id])) {
            return null;
        }
        return new Row($this, $id);
    }
public function getRow ( $ id = null ) { if ( $ this -> isDetached ) { if ( $ id !== null ) { throw new InvalidArgumentException ( 'Argument $id in Result::getRow method cannot be passed when Result is in detached state.' ) ; } $ id = self :: DETACHED_ROW_ID ; } elseif ( $ id === null ) { throw new InvalidArgumentException ( 'Argument $id in Result::getRow method must be passed when Result is in attached state.' ) ; } if ( ! isset ( $ this -> data [ $ id ] ) ) { return null ; } return new Row ( $ this , $ id ) ; }
Creates new Row instance pointing to specific row within Result

@param int $id
@throws InvalidArgumentException
@return Row|null
Creates new Row instance pointing to specific row within Result