示例#1
0
 function setValue($value)
 {
     if (is_array($value)) {
         if ($value['u'] == 'lifetime') {
             $this->period = Am_Period::getLifetime();
         } else {
             if ($value['c'] && $value['u']) {
                 $this->period = new Am_Period($value['c'], $value['u']);
             } else {
                 $this->period = new Am_Period();
             }
         }
     } else {
         $this->period = new Am_Period($value);
     }
     $value = $this->period->__toString();
     parent::setValue($value);
 }