/**
  * 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      BulkUploadResult $value A BulkUploadResult object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(BulkUploadResult $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
Esempio n. 2
0
 /**
  * Function constructs an array of the return values of the bulk upload result and returns it
  * @param BulkUploadResult $bulkUploadResult
  * @param kJobData $data
  * @return array
  */
 protected static function writeUserBulkUploadResults(BulkUploadResult $bulkUploadResult, kJobData $data)
 {
     /* @var $bulkUploadResult BulkUploadResultKuser */
     $values = array();
     $values[] = $bulkUploadResult->getPuserId();
     $values[] = $bulkUploadResult->getScreenName();
     $values[] = $bulkUploadResult->getEmail();
     $values[] = is_null($bulkUploadResult->getDateOfBirth()) ? '' : date('Y-m-d', $bulkUploadResult->getDateOfBirth());
     $values[] = $bulkUploadResult->getCountry();
     $values[] = $bulkUploadResult->getState();
     $values[] = $bulkUploadResult->getCity();
     $values[] = $bulkUploadResult->getZip();
     $values[] = $bulkUploadResult->getGender();
     $values[] = $bulkUploadResult->getFirstName();
     $values[] = $bulkUploadResult->getLastName();
     $values[] = $bulkUploadResult->getTags();
     $values[] = $bulkUploadResult->getPartnerData();
     return $values;
 }
 public function getThumbnailSaved()
 {
     return $this->getFromCustomData(self::THUMBNAIL_SAVED, null, parent::getThumbnailSaved());
 }
Esempio n. 4
0
 protected function updateEntryThumbnail(BulkUploadResult $bulkUploadResult)
 {
     if ($bulkUploadResult->getEntryStatus() != entryStatus::READY || !strlen($bulkUploadResult->getThumbnailUrl()) || $bulkUploadResult->getThumbnailSaved()) {
         return;
     }
     myEntryUtils::updateThumbnailFromFile($bulkUploadResult->getEntry(), $bulkUploadResult->getThumbnailUrl());
     $bulkUploadResult->setThumbnailSaved(true);
     $bulkUploadResult->save();
 }
 /**
  * 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      BulkUploadResult $value A BulkUploadResult object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(BulkUploadResult $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         if (isset(self::$instances[$key]) || count(self::$instances) < kConf::get('max_num_instances_in_pool')) {
             self::$instances[$key] = $obj;
             kMemoryManager::registerPeer('BulkUploadResultPeer');
         }
     }
 }