123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- class CcBlockcontents extends BaseCcBlockcontents {
-
- public function getDbFadein($format = "s.u")
- {
- return parent::getDbFadein($format);
- }
-
-
- public function getDbFadeout($format = "s.u")
- {
- return parent::getDbFadeout($format);
- }
-
-
- public function setDbFadein($v)
- {
- $microsecond = 0;
- if ($v instanceof DateTime) {
- $dt = $v;
- }
- else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
-
-
- $info = explode('.', $v);
- $microsecond = $info[1];
- $dt = DateTime::createFromFormat("s", $info[0]);
- }
- else {
- try {
- $dt = new DateTime($v);
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
- }
-
- if ($microsecond == 0) {
- $this->fadein = $dt->format('H:i:s.u');
- } else {
- $this->fadein = $dt->format('H:i:s').".".$microsecond;
- }
- $this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN;
-
- return $this;
- }
-
-
- public function setDbFadeout($v)
- {
- $microsecond = 0;
- if ($v instanceof DateTime) {
- $dt = $v;
- }
- else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
-
-
- $info = explode('.', $v);
- $microsecond = $info[1];
- $dt = DateTime::createFromFormat("s", $info[0]);
- }
- else {
- try {
- $dt = new DateTime($v);
- } catch (Exception $x) {
- throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
- }
- }
- if ($microsecond == 0) {
- $this->fadeout = $dt->format('H:i:s.u');
- } else {
- $this->fadeout = $dt->format('H:i:s').".".$microsecond;
- }
- $this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT;
-
- return $this;
- }
- }
|