本文整理汇总了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);
}