예제 #1
0
 /**
  * Saves a Profile.
  *
  * @param Profile $profile A Profile instance
  *
  * @return Boolean
  */
 public function saveProfile(Profile $profile)
 {
     if (!($ret = $this->storage->write($profile)) && null !== $this->logger) {
         $this->logger->warning('Unable to store the profiler information.');
     }
     return $ret;
 }
예제 #2
0
 /**
  * Saves a Profile.
  *
  * @param Profile $profile A Profile instance
  *
  * @return bool
  */
 public function saveProfile(Profile $profile)
 {
     // late collect
     foreach ($profile->getCollectors() as $collector) {
         if ($collector instanceof LateDataCollectorInterface) {
             $collector->lateCollect();
         }
     }
     if (!($ret = $this->storage->write($profile)) && null !== $this->logger) {
         $this->logger->warning('Unable to store the profiler information.', array('configured_storage' => get_class($this->storage)));
     }
     return $ret;
 }