Author: Michael Slusarz (slusarz@horde.org)
Esempio n. 1
0
File: Date.php Progetto: horde/horde
 /**
  * Constructor.
  *
  * @param mixed $data  Either a DateTime object, or a date format that
  *                     can be converted to a DateTime object.
  *
  * @throws Exception
  */
 public function __construct($data)
 {
     if (!$data instanceof DateTime) {
         $data = new Horde_Imap_Client_DateTime($data);
     }
     parent::__construct($data);
 }
Esempio n. 2
0
 /**
  * @see add()
  */
 public function __construct($data = null)
 {
     parent::__construct(array());
     if (!is_null($data)) {
         $this->add($data);
     }
 }
Esempio n. 3
0
 /**
  */
 public function escape()
 {
     return strlen($this->_data) ? parent::escape() : '""';
 }