/**
  * 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 you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by find*()
  * and findPk*() calls.
  *
  * @param \RatingValue $obj A \RatingValue object.
  * @param string $key             (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if (null === $key) {
             $key = serialize(array((string) $obj->getRatingHeaderId(), (string) $obj->getCategoryOptionId()));
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
示例#2
0
        $header->setScore($score);
        $header->save($con);
        $con->commit();
        header("Location: /game.php?name=" . $game->getName() . "&platform=" . $platform->getName());
        /* Redirect browser */
    } catch (Exception $e) {
        $con->rollback();
        echo $e->getMessage();
        echo $e->getTraceAsString();
        exit;
    }
}
$current_option_array = [];
if ($header != null) {
    foreach ($header->getRatingValues() as $value) {
        $current_option_array[$value->getCategoryOptionId()] = $value;
    }
}
?>
<!DOCTYPE html>
<!-- saved from url=(0026)http://alessandro.pw/pcmr/ -->
<html xmlns="http://www.w3.org/1999/html">
<head>


    <?php 
include "res/head.php";
?>

    <meta charset="UTF-8"/>
    <meta name="description" content="this site may come in handy to compute PCMRatings">