public function getRow($n = 0, string $type = 'object')
	{
		if (! is_numeric($n))
		{
			// We cache the row data for subsequent uses
			is_array($this->rowData) || $this->rowData = $this->getRowArray(0);

			// array_key_exists() instead of isset() to allow for NULL values
			if (empty($this->rowData) || ! array_key_exists($n, $this->rowData))
			{
				return null;
			}

			return $this->rowData[$n];
		}

		if ($type === 'object')
		{
			return $this->getRowObject($n);
		}
		elseif ($type === 'array')
		{
			return $this->getRowArray($n);
		}

		return $this->getCustomRowObject($n, $type);
	}
public function getRow($n = 0, string $type = 'object')
	{
		if (! is_numeric($n))
		{
			// We cache the row data for subsequent uses
			is_array($this->rowData) || $this->rowData = $this->getRowArray(0);

			// array_key_exists() instead of isset() to allow for NULL values
			if (empty($this->rowData) || ! array_key_exists($n, $this->rowData))
			{
				return null;
			}

			return $this->rowData[$n];
		}

		if ($type === 'object')
		{
			return $this->getRowObject($n);
		}
		elseif ($type === 'array')
		{
			return $this->getRowArray($n);
		}

		return $this->getCustomRowObject($n, $type);
	}
public function getRow ( $ n = 0 , string $ type = 'object' ) { if ( ! is_numeric ( $ n ) ) { // We cache the row data for subsequent uses is_array ( $ this -> rowData ) || $ this -> rowData = $ this -> getRowArray ( 0 ) ; // array_key_exists() instead of isset() to allow for NULL values if ( empty ( $ this -> rowData ) || ! array_key_exists ( $ n , $ this -> rowData ) ) { return null ; } return $ this -> rowData [ $ n ] ; } if ( $ type === 'object' ) { return $ this -> getRowObject ( $ n ) ; } elseif ( $ type === 'array' ) { return $ this -> getRowArray ( $ n ) ; } return $ this -> getCustomRowObject ( $ n , $ type ) ; }
Wrapper object to return a row as either an array, an object, or
a custom class.

If row doesn't exist, returns null.

@param mixed   $n    The index of the results to return
@param string  $type The type of result object. 'array', 'object' or class name.

@return mixed
Wrapper object to return a row as either an array an object or a custom class .