/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param CcFiles $value A CcFiles object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool(CcFiles $obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getDbId(); } // if key === null self::$instances[$key] = $obj; } }
/** * Filter the query by a related CcFiles object * * @param CcFiles $ccFiles the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcMusicDirsQuery The current query, for fluid interface */ public function filterByCcFiles($ccFiles, $comparison = null) { return $this->addUsingAlias(CcMusicDirsPeer::ID, $ccFiles->getDbDirectory(), $comparison); }
/** * Declares an association between this object and a CcFiles object. * * @param CcFiles $v * @return CcShowInstances The current object (for fluent API support) * @throws PropelException */ public function setCcFiles(CcFiles $v = null) { if ($v === null) { $this->setDbRecordedFile(NULL); } else { $this->setDbRecordedFile($v->getDbId()); } $this->aCcFiles = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the CcFiles object, it will not be re-added. if ($v !== null) { $v->addCcShowInstances($this); } return $this; }
public static function Insert($md) { // save some work by checking if filepath is given right away if (!isset($md['MDATA_KEY_FILEPATH'])) { return null; } $file = new CcFiles(); $now = new DateTime("now", new DateTimeZone("UTC")); $file->setDbUtime($now); $file->setDbMtime($now); $storedFile = new Application_Model_StoredFile(); $storedFile->_file = $file; // removed "//" in the path. Always use '/' for path separator // TODO : it might be better to just call OsPath::normpath on the file // path. Also note that mediamonitor normalizes the paths anyway // before passing them to php so it's not necessary to do this at all $filepath = str_replace("//", "/", $md['MDATA_KEY_FILEPATH']); $res = $storedFile->setFilePath($filepath); if ($res === -1) { return null; } $storedFile->setMetadata($md); return $storedFile; }
/** * Filter the query by a related CcFiles object * * @param CcFiles $ccFiles the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcScheduleQuery The current query, for fluid interface */ public function filterByCcFiles($ccFiles, $comparison = null) { return $this->addUsingAlias(CcSchedulePeer::FILE_ID, $ccFiles->getDbId(), $comparison); }
/** * Filter the query by a related CcFiles object * * @param CcFiles $ccFiles the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcPlaylistcontentsQuery The current query, for fluid interface */ public function filterByCcFiles($ccFiles, $comparison = null) { return $this->addUsingAlias(CcPlaylistcontentsPeer::FILE_ID, $ccFiles->getDbId(), $comparison); }
/** * Exclude object from result * * @param CcFiles $ccFiles Object to remove from the list of results * * @return CcFilesQuery The current query, for fluid interface */ public function prune($ccFiles = null) { if ($ccFiles) { $this->addUsingAlias(CcFilesPeer::ID, $ccFiles->getDbId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related CcFiles object * * @param CcFiles $ccFiles the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CcSubjsQuery The current query, for fluid interface */ public function filterByCcFiles($ccFiles, $comparison = null) { return $this->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbEditedby(), $comparison); }
public static function Insert($md = null) { $file = new CcFiles(); $file->setDbGunid(md5(uniqid("", true))); $storedFile = new StoredFile(); $storedFile->_file = $file; if (isset($md['MDATA_KEY_FILEPATH'])) { $res = $storedFile->setFilePath($md['MDATA_KEY_FILEPATH']); if ($res === -1) { return null; } } else { return null; } if (isset($md)) { $storedFile->setMetadata($md); } return $storedFile; }