2011-01-10 19:24:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Skeleton subclass for representing a row from the 'cc_files' table.
|
|
|
|
*
|
2012-02-07 13:29:50 +01:00
|
|
|
*
|
2011-01-10 19:24:21 +01:00
|
|
|
*
|
|
|
|
* You should add additional methods to this class to meet the
|
|
|
|
* application requirements. This class will only be generated as
|
|
|
|
* long as it does not already exist in the output directory.
|
|
|
|
*
|
|
|
|
* @package propel.generator.campcaster
|
|
|
|
*/
|
|
|
|
class CcFiles extends BaseCcFiles {
|
|
|
|
|
2012-07-11 00:51:32 +02:00
|
|
|
public function getDbLength($format = "H:i:s.u")
|
2011-01-10 19:24:21 +01:00
|
|
|
{
|
2012-02-07 14:58:16 +01:00
|
|
|
return parent::getDbLength($format);
|
2011-01-10 19:24:21 +01:00
|
|
|
}
|
|
|
|
|
2012-02-07 13:29:50 +01:00
|
|
|
public function setDbLength($v)
|
2011-01-10 19:24:21 +01:00
|
|
|
{
|
2012-02-07 13:29:50 +01:00
|
|
|
if ($v instanceof DateTime) {
|
|
|
|
$dt = $v;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
$dt = new DateTime($v);
|
|
|
|
|
|
|
|
} catch (Exception $x) {
|
2012-09-19 16:24:45 +02:00
|
|
|
throw new PropelException('Error parsing date/time value: ' .
|
|
|
|
var_export($v, true), $x);
|
2012-02-07 13:29:50 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->length = $dt->format('H:i:s.u');
|
|
|
|
$this->modifiedColumns[] = CcFilesPeer::LENGTH;
|
|
|
|
|
|
|
|
return $this;
|
2011-01-10 19:24:21 +01:00
|
|
|
}
|
|
|
|
|
2012-11-05 16:08:29 +01:00
|
|
|
// returns true if the file exists and is not hidden
|
|
|
|
public function displayable() {
|
|
|
|
return $this->getDbFileExists() && !$this->getDbHidden();
|
|
|
|
}
|
|
|
|
|
2012-09-19 16:23:54 +02:00
|
|
|
public function reassignTo($user)
|
|
|
|
{
|
2012-08-28 22:22:35 +02:00
|
|
|
$this->setDbOwnerId( $user->getDbId() );
|
2012-09-19 00:20:33 +02:00
|
|
|
$this->save();
|
2012-08-28 22:22:35 +02:00
|
|
|
}
|
2011-01-10 19:24:21 +01:00
|
|
|
|
|
|
|
} // CcFiles
|