getDbCuein(); $cueout = $this->getDbCueout(); $cueinSec = Application_Common_DateHelper::calculateLengthInSeconds($cuein); $cueoutSec = Application_Common_DateHelper::calculateLengthInSeconds($cueout); $lengthSec = bcsub($cueoutSec, $cueinSec, 6); $length = Application_Common_DateHelper::secondsToPlaylistTime($lengthSec); return $length; } public function getDbLength($format = "H:i:s.u") { return parent::getDbLength($format); } public function setDbLength($v) { //we are using DateTime instead of DateInterval because the latter doesn't //support subseconds :( if ($v instanceof DateTime) { $dt = $v; } else { try { $dt = new DateTime($v); } catch (Exception $x) { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } $this->length = $dt->format('H:i:s.u'); $this->modifiedColumns[] = CcFilesPeer::LENGTH; return $this; } // returns true if the file exists and is not hidden public function visible() { return $this->getDbFileExists() && !$this->getDbHidden(); } public function reassignTo($user) { $this->setDbOwnerId( $user->getDbId() ); $this->save(); } } // CcFiles