本文整理汇总了PHP中EntityManager::beginTransaction方法的典型用法代码示例。如果您正苦于以下问题:PHP EntityManager::beginTransaction方法的具体用法?PHP EntityManager::beginTransaction怎么用?PHP EntityManager::beginTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityManager
的用法示例。
在下文中一共展示了EntityManager::beginTransaction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
$kernel = static::createKernel();
$kernel->boot();
$this->_em = $kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->_em->beginTransaction();
$this->client = static::createClient();
}
示例2: setUp
protected function setUp()
{
$kernel = static::createKernel();
$kernel->boot();
$this->em = $kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->activityService = $kernel->getContainer()->get('inkstand_lrs.activity');
$this->validator = $kernel->getContainer()->get('validator');
$this->em->beginTransaction();
}
示例3: setUp
public function setUp()
{
@exec('php app/console syw:user:delete ' . $this->test1_username . ' >/dev/null 2>&1');
@exec('php app/console syw:user:delete ' . $this->test2_username . ' >/dev/null 2>&1');
$kernel = static::createKernel();
$kernel->boot();
$this->_em = $kernel->getContainer()->get('doctrine.orm.entity_manager');
$this->_em->beginTransaction();
$this->client = static::createClient();
$this->base_host = $this->client->getKernel()->getContainer()->getParameter('base_host');
$this->base_proto = $this->client->getKernel()->getContainer()->getParameter('base_proto');
$this->api_host = $this->client->getKernel()->getContainer()->getParameter('api_host');
$this->api_proto = $this->client->getKernel()->getContainer()->getParameter('api_proto');
}