| @@ 78-89 (lines=12) @@ | ||
| 75 | return true; |
|
| 76 | } |
|
| 77 | ||
| 78 | private static function generate_proxyfile(ClassMetadata $cm) |
|
| 79 | { |
|
| 80 | $em = connection::get_em(); |
|
| 81 | $generator = new ProxyGenerator($em->getConfiguration()->getProxyDir(), $em->getConfiguration()->getProxyNamespace()); |
|
| 82 | $generator->setPlaceholder('baseProxyInterface', 'Doctrine\ORM\Proxy\Proxy'); |
|
| 83 | $filename = $generator->getProxyFileName($cm->getName()); |
|
| 84 | if (file_exists($filename)) { |
|
| 85 | unlink($filename); |
|
| 86 | } |
|
| 87 | $generator->generateProxyClass($cm, $filename); |
|
| 88 | } |
|
| 89 | ||
| 90 | private static function get_cm($em, $classname) |
|
| 91 | { |
|
| 92 | if (!class_exists($classname)) { |
|
| @@ 118-133 (lines=16) @@ | ||
| 115 | $output->writeln('Done'); |
|
| 116 | } |
|
| 117 | ||
| 118 | private function generate_proxyfiles(array $cms) |
|
| 119 | { |
|
| 120 | $em = connection::get_em(); |
|
| 121 | $generator = new ProxyGenerator($em->getConfiguration()->getProxyDir(), $em->getConfiguration()->getProxyNamespace()); |
|
| 122 | $generator->setPlaceholder('baseProxyInterface', 'Doctrine\ORM\Proxy\Proxy'); |
|
| 123 | ||
| 124 | foreach ($cms as $cm) { |
|
| 125 | $filename = $generator->getProxyFileName($cm->getName()); |
|
| 126 | if (file_exists($filename)) { |
|
| 127 | unlink($filename); |
|
| 128 | } |
|
| 129 | $generator->generateProxyClass($cm, $filename); |
|
| 130 | } |
|
| 131 | } |
|
| 132 | ||
| 133 | private function process_updates(array $to_update, OutputInterface $output, $force) |
|
| 134 | { |
|
| 135 | $em = connection::get_em(); |
|
| 136 | $conn = $em->getConnection(); |
|