public function toArray()
	{
		$error = array(
			'code'    => $this->getCode(),
			'message' => $this->getMessage(),
		);

		if ($this->getData()) {
			$error['data'] = $this->getData();
		}

		return $error;
	}
public function toArray()
	{
		$error = array(
			'code'    => $this->getCode(),
			'message' => $this->getMessage(),
		);

		if ($this->getData()) {
			$error['data'] = $this->getData();
		}

		return $error;
	}
public function toArray ( ) { $ error = array ( 'code' => $ this -> getCode ( ) , 'message' => $ this -> getMessage ( ) , ) ; if ( $ this -> getData ( ) ) { $ error [ 'data' ] = $ this -> getData ( ) ; } return $ error ; }
Transform object to array

@return array
Transform object to array