Newscoop\Image\RenditionService::createSchemaIfMissing PHP Метод

createSchemaIfMissing() приватный Метод

Create schema for article rendition
private createSchemaIfMissing ( Exception $e ) : void
$e Exception
Результат void
    private function createSchemaIfMissing(\Exception $e)
    {
        if ($e->getCode() === '42S02') {
            try {
                $schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->orm);
                $schemaTool->createSchema(array($this->orm->getClassMetadata('Newscoop\\Image\\ArticleRendition')));
            } catch (\Exception $e) {
                // ignore possible errors - foreign key to Images table
            }
        }
    }