/**
  * Retrieves blog information for specified blog
  * @param  string  id   Blog id, only needed for multi-blog
  *                      environments (hosted at wordpress.com or a Mu install)
  * @return ZendX_Service_Wordpress_Abstract
  */
 public function getBlog($id = 0)
 {
     $client = $this->getXmlRpcClient()->setBlogId($id);
     $data = $client->callWithCredentials('wp.getOptions');
     foreach ($data as $key => $option) {
         $data[$key] = $option['value'];
     }
     $blog = new ZendX_Service_Wordpress_Blog($client);
     $blog->setData($data);
     return $blog;
 }
 /**
  * @return array post categories
  */
 public function getCategories()
 {
     // Get category objects that are in post
     $categoryObjects = array_filter(parent::getCategories(), array($this, "hasCategory"));
     // Sort category objects to same order as post categories
     $categoryNames = $this->get('categories');
     foreach ($categoryObjects as $categoryObject) {
         $index = array_search($categoryObject->getName(), $categoryNames);
         $categoryNames[$index] = $categoryObject;
     }
     return $categoryNames;
 }