public function parse($data) { /* * Assign the data returned from the PortfolioProxy.php to $this->databaseData. */ $this->databaseData = $data; /* * Process through the data returned from the proxy. */ while ($row = mysql_fetch_array($this->databaseData)) { $vo = new SettingsVO($row['id']); $vo->siteTitle($row['siteName']); $vo->siteDescription($row['siteDescription']); $vo->adminEmail($row['adminEmail']); $vo->maintenanceMode($row['maintenanceMode']); $vo->uploadPath($row['uploadPath']); $vo->enableUploads($row['enableUploads']); $vo->twitterUsername($row['twitterUsername']); $vo->twitterPassword($row['twitterPassword']); $vo->enableTwitter($row['enableTwitter']); $vo->autoTweet($row['autoTweet']); $vo->about($row['about']); /* * Push the new object to the array containing the parsed objects. */ array_push($this->parsedData, $vo); } /* * Reverse the array so the oldest items are at * the start of the array, then return it. */ return array_reverse($this->parsedData); }