コード例 #1
0
 /**
  * @see    AbstractTable::getPointer
  * @param  string   $columnName
  * @param  mixed    $value
  * @param  int|null $pointer (default getPointer)
  * @throws RuntimeException
  * @return AbstractTable this
  */
 public final function set($columnName, $value, $pointer = null)
 {
     if ($this->isReadOnly()) {
         throw new RuntimeException('this object is read only');
     }
     if (!isset($this->columnList[$columnName])) {
         throw new RuntimeException('column `' . $columnName . '` not exists');
     }
     if ($pointer === null) {
         $pointer = $this->getPointer();
     }
     $this->content->set($pointer, $columnName, $value);
     return $this;
 }
コード例 #2
0
 /**
  * @param  array $data { string => string }
  * @param  bool  $close
  * @return SiteModeHandler this
  */
 protected function saveForm($data, $close = false)
 {
     $form = array('data' => $data, 'close' => $close);
     $this->storedForms->set($this->request->getArea(), $this->request->getPage(), $form);
     return $this;
 }
コード例 #3
0
ファイル: BucketTest.php プロジェクト: map-framework/map
 /**
  * @expectedException RuntimeException
  * @expectedExceptionCode 2
  */
 public function testSet_invalidKey()
 {
     $this->bucket->set(self::GROUP, self::INVALID_KEY, self::VALUE_INT);
 }