示例#1
0
 /**
  * Returns a Collection of server objects, filtered by the specified
  * parameters
  *
  * This is a factory method and should normally be called instead of
  * creating a ServerList object directly.
  *
  * @api
  * @param boolean $details - if TRUE, full server details are returned; if
  *                         FALSE, just the minimal set of info is listed. Defaults to TRUE;
  *                         you might set this to FALSE to improve performance at the risk of
  *                         not having all the information you need.
  * @param array   $filter  - a set of key/value pairs that is passed to the
  *                         servers list for filtering
  * @returns \OpenCloud\Common\Collection
  */
 public function serverList($details = true, array $filter = array())
 {
     $url = $this->getUrl(Resource\Server::resourceName() . ($details ? '/detail' : ''), $filter);
     return $this->collection('OpenCloud\\Compute\\Resource\\Server', $url);
 }