1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace OSS\Model;
- use OSS\Core\OssException;
- class RestoreConfig implements XmlConfig
- {
-
- public function __construct($day, $tier = null)
- {
- $this->day = $day;
- $this->tier = $tier;
- }
-
- public function parseFromXml($strXml)
- {
- throw new OssException("Not implemented.");
- }
-
- public function serializeToXml()
- {
- $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><RestoreRequest></RestoreRequest>');
- $xml->addChild('Days', strval($this->day));
- if (isset($this->tier)) {
- $xml_param = $xml->addChild('JobParameters');
- $xml_param->addChild('Tier', $this->tier);
- }
- return $xml->asXML();
- }
- public function __toString()
- {
- return $this->serializeToXml();
- }
-
- public function getDay()
- {
- return $this->day;
- }
-
- public function getTier()
- {
- return $this->tier;
- }
- private $day = 1;
- private $tier = 'Standard';
- }
|