Exemple #1
0
    $courtofappeal = @$r['6'];
    $schedule = array();
    for ($i0 = 0; isset($r['7.' . $i0]); $i0++) {
        $schedule[$i0] = array('id' => @$r['7.' . $i0 . '.0'], 'casenr' => @$r['7.' . $i0 . '.0']);
        $schedule[$i0]['defendant'] = array();
        for ($i1 = 0; isset($r['7.' . $i0 . '.1.' . $i1]); $i1++) {
            $schedule[$i0]['defendant'][$i1] = @$r['7.' . $i0 . '.1.' . $i1 . ''];
        }
        $schedule[$i0]['plaintiff'] = array();
        for ($i1 = 0; isset($r['7.' . $i0 . '.2.' . $i1]); $i1++) {
            $schedule[$i0]['plaintiff'][$i1] = @$r['7.' . $i0 . '.2.' . $i1 . ''];
        }
    }
    $Court = new Court($ID, $Sessions, $panels, $members, $cases, $mainoffice, $localoffices, $courtofappeal, $schedule);
    if ($Court->save() !== false) {
        die('ok:' . $_SERVER['PHP_SELF'] . '?Court=' . urlencode($Court->getId()));
    } else {
        die('');
    }
    exit;
    // do not show the interface
}
$buttons = "";
if (isset($_REQUEST['new'])) {
    $new = true;
} else {
    $new = false;
}
if (isset($_REQUEST['edit']) || $new) {
    $edit = true;
} else {
 /**
  * Declares an association between this object and a Court object.
  *
  * @param                  Court $v
  * @return PlayerCourt The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCourt(Court $v = null)
 {
     if ($v === null) {
         $this->setCourtId(NULL);
     } else {
         $this->setCourtId($v->getId());
     }
     $this->aCourt = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Court object, it will not be re-added.
     if ($v !== null) {
         $v->addPlayerCourt($this);
     }
     return $this;
 }
 /**
  * @covers AppBundle\Entity\Court::getId
  * Implement testGetId().
  */
 public function testGetId()
 {
     $this->assertEmpty($this->court->getId());
 }
 /**
  * Exclude object from result
  *
  * @param   Court $court Object to remove from the list of results
  *
  * @return CourtQuery The current query, for fluid interface
  */
 public function prune($court = null)
 {
     if ($court) {
         $this->addUsingAlias(CourtPeer::ID, $court->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * 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 Court $obj A Court 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 ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         CourtPeer::$instances[$key] = $obj;
     }
 }
 /**
  * Filter the query by a related Court object
  *
  * @param   Court|PropelObjectCollection $court The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 PlayerCourtQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByCourt($court, $comparison = null)
 {
     if ($court instanceof Court) {
         return $this->addUsingAlias(PlayerCourtPeer::COURT_ID, $court->getId(), $comparison);
     } elseif ($court instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PlayerCourtPeer::COURT_ID, $court->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCourt() only accepts arguments of type Court or PropelCollection');
     }
 }