public function describeDBSnapshots($dBInstanceIdentifier = null, $dBSnapshotIdentifier = null, $snapshotType = null, $marker = null, $maxRecords = null)
{
$result = null;
$options = array();
$action = ucfirst(__FUNCTION__);
if ($dBInstanceIdentifier !== null) {
$options['DBInstanceIdentifier'] = (string) $dBInstanceIdentifier;
}
if ($dBSnapshotIdentifier !== null) {
$options['DBSnapshotIdentifier'] = (string) $dBSnapshotIdentifier;
}
if ($snapshotType !== null) {
$options['SnapshotType'] = (string) $snapshotType;
}
if ($marker !== null) {
$options['Marker'] = (string) $marker;
}
if ($maxRecords !== null) {
$options['MaxRecords'] = (int) $maxRecords;
}
$response = $this->client->call($action, $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if (!$this->exist($sxml->{$action . 'Result'})) {
throw new RdsException(sprintf(self::UNEXPECTED, $action));
}
$ptr = $sxml->{$action . 'Result'};
$result = new DBSnapshotList();
$result->setRds($this->rds);
$result->marker = $this->exist($ptr->Marker) ? (string) $ptr->Marker : null;
if (isset($ptr->DBSnapshots->DBSnapshot)) {
foreach ($ptr->DBSnapshots->DBSnapshot as $v) {
$item = $this->_loadDBSnapshotData($v);
$result->append($item);
unset($item);
}
}
}
return $result;
}