本文整理匯總了PHP中Zend\Db\Adapter\ParameterContainer::offsetSetErrata方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParameterContainer::offsetSetErrata方法的具體用法?PHP ParameterContainer::offsetSetErrata怎麽用?PHP ParameterContainer::offsetSetErrata使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\Db\Adapter\ParameterContainer
的用法示例。
在下文中一共展示了ParameterContainer::offsetSetErrata方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testGetErrataIterator
/**
* @testdox unit test: Test getErrataIterator() will return an iterator for the errata data
* @covers Zend\Db\Adapter\ParameterContainer::getErrataIterator
*/
public function testGetErrataIterator()
{
$this->parameterContainer->offsetSetErrata('foo', ParameterContainer::TYPE_INTEGER);
$data = $this->parameterContainer->getErrataIterator();
$this->assertInstanceOf('ArrayIterator', $data);
}
示例2: onPreInsert
/**
* Customize the Insert object to include extra metadata about the
* search_object field so that it will be written correctly. This is
* triggered only when we're interacting with PostgreSQL; MySQL works fine
* without the extra hint.
*
* @param object $event Event object
*
* @return void
*/
public function onPreInsert($event)
{
$driver = $event->getTarget()->getAdapter()->getDriver();
$statement = $driver->createStatement();
$params = new ParameterContainer();
$params->offsetSetErrata('search_object', ParameterContainer::TYPE_LOB);
$statement->setParameterContainer($params);
$driver->registerStatementPrototype($statement);
}