Mise à jour de symfony

Mise à jour de PHP
Correction des entitées from attributes to annotations
Ajout des entitées des objets 3D
This commit is contained in:
Mysaa 2023-01-17 17:27:49 +01:00
parent 54fa272910
commit 145f4aa7fd
Signed by: Mysaa
GPG Key ID: 7054D5D6A90F084F
35 changed files with 1770 additions and 1307 deletions

2
.env
View File

@ -16,5 +16,5 @@
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
APP_ENV=dev APP_ENV=dev
APP_SECRET=4ac311452d59f190410fa17f3bf1ebe0 APP_SECRET=7f0dfc149d55b4ca2cf7bcc72c5ff7e1
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###

5
.gitignore vendored
View File

@ -8,3 +8,8 @@
/var/ /var/
/vendor/ /vendor/
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
# Eclipse projects
.settings/
.buildpath
.project

View File

@ -4,30 +4,24 @@
"minimum-stability": "stable", "minimum-stability": "stable",
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-iconv": "*", "ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.7", "doctrine/doctrine-bundle": "^2.8",
"doctrine/doctrine-migrations-bundle": "^3.2", "doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.13", "doctrine/orm": "^2.14",
"symfony/console": "5.4.*", "symfony/console": "6.2.*",
"symfony/dotenv": "5.4.*", "symfony/dotenv": "6.2.*",
"symfony/flex": "^1.17|^2", "symfony/flex": "^2",
"symfony/framework-bundle": "5.4.*", "symfony/framework-bundle": "6.2.*",
"symfony/proxy-manager-bridge": "5.4.*", "symfony/runtime": "6.2.*",
"symfony/runtime": "5.4.*", "symfony/yaml": "6.2.*"
"symfony/yaml": "5.4.*"
}, },
"config": { "config": {
"allow-plugins": { "allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true, "symfony/flex": true,
"symfony/runtime": true "symfony/runtime": true
}, },
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true "sort-packages": true
}, },
"autoload": { "autoload": {
@ -43,7 +37,11 @@
"replace": { "replace": {
"symfony/polyfill-ctype": "*", "symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*", "symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*" "symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
}, },
"scripts": { "scripts": {
"auto-scripts": { "auto-scripts": {
@ -63,10 +61,10 @@
"extra": { "extra": {
"symfony": { "symfony": {
"allow-contrib": false, "allow-contrib": false,
"require": "5.4.*" "require": "6.2.*"
} }
}, },
"require-dev": { "require-dev": {
"symfony/maker-bundle": "^1.43" "symfony/maker-bundle": "^1.48"
} }
} }

1606
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
doctrine: doctrine:
dbal: dbal:
driver: 'pdo_pgsql' driver: 'pdo_pgsql'
dbname: 'encartes-data' dbname: 'encartes'
host: '127.0.0.1' host: '127.0.0.1'
port: 5432 port: 5432
user: 'encartes' user: 'encartes'
password: 'c0BanMCsQyxmPXhU1TjgXNvoSuXVsSNrxeWHKHyTYMk=' password: 'c0BanMCsQyxmPXhU1TjgXNvoSuXVsSNrxeWHKHyTYMk='
server_version: '13' server_version: '15'
charset: 'utf8' charset: 'utf8'
orm: orm:
auto_generate_proxy_classes: true auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true auto_mapping: true
enable_lazy_ghost_objects: true
mappings: mappings:
App: App:
is_bundle: false is_bundle: false
@ -29,6 +30,7 @@ when@prod:
doctrine: doctrine:
orm: orm:
auto_generate_proxy_classes: false auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver: query_cache_driver:
type: pool type: pool
pool: doctrine.system_cache_pool pool: doctrine.system_cache_pool

View File

@ -3,6 +3,7 @@ framework:
secret: '%env(APP_SECRET)%' secret: '%env(APP_SECRET)%'
#csrf_protection: true #csrf_protection: true
http_method_override: false http_method_override: false
handle_all_throwables: true
# Enables session support. Note that the session will ONLY be started if you read or write from it. # Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support. # Remove or comment this section to explicitly disable session support.

View File

@ -1,3 +1,5 @@
#index: controllers:
# path: / resource:
# controller: App\Controller\DefaultController::index path: ../src/Controller/
namespace: App\Controller
type: attribute

View File

@ -1,7 +0,0 @@
controllers:
resource: ../../src/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation

View File

@ -1,8 +0,0 @@
version: '3'
services:
###> doctrine/doctrine-bundle ###
database:
ports:
- "5432"
###< doctrine/doctrine-bundle ###

View File

@ -1,21 +0,0 @@
version: '3'
services:
###> doctrine/doctrine-bundle ###
database:
image: postgres:${POSTGRES_VERSION:-14}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-app}
# You should definitely change the password in production
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!U9vqdZlhMPI5yUy2I7wRg7DPpUPmIvQoe76aZ0Y!}
POSTGRES_USER: ${POSTGRES_USER:-app}
volumes:
- db-data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
###< doctrine/doctrine-bundle ###
volumes:
###> doctrine/doctrine-bundle ###
db-data:
###< doctrine/doctrine-bundle ###

View File

@ -1,57 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221116134026 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE building_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE corridor_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE floor_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE place_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE room_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE site_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE building (id INT NOT NULL, site_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_E16F61D4F6BD1646 ON building (site_id)');
$this->addSql('CREATE TABLE corridor (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE floor (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE place (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE room (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE site (id INT NOT NULL, zero_latitude DOUBLE PRECISION NOT NULL, zero_longitude DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('ALTER TABLE building ADD CONSTRAINT FK_E16F61D4F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE building_id_seq CASCADE');
$this->addSql('DROP SEQUENCE corridor_id_seq CASCADE');
$this->addSql('DROP SEQUENCE floor_id_seq CASCADE');
$this->addSql('DROP SEQUENCE place_id_seq CASCADE');
$this->addSql('DROP SEQUENCE room_id_seq CASCADE');
$this->addSql('DROP SEQUENCE site_id_seq CASCADE');
$this->addSql('ALTER TABLE building DROP CONSTRAINT FK_E16F61D4F6BD1646');
$this->addSql('DROP TABLE building');
$this->addSql('DROP TABLE corridor');
$this->addSql('DROP TABLE floor');
$this->addSql('DROP TABLE place');
$this->addSql('DROP TABLE room');
$this->addSql('DROP TABLE site');
}
}

View File

@ -1,50 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221116143546 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE place_place (place_source INT NOT NULL, place_target INT NOT NULL, PRIMARY KEY(place_source, place_target))');
$this->addSql('CREATE INDEX IDX_DD6B48EEFD44781A ON place_place (place_source)');
$this->addSql('CREATE INDEX IDX_DD6B48EEE4A12895 ON place_place (place_target)');
$this->addSql('ALTER TABLE place_place ADD CONSTRAINT FK_DD6B48EEFD44781A FOREIGN KEY (place_source) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE place_place ADD CONSTRAINT FK_DD6B48EEE4A12895 FOREIGN KEY (place_target) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE corridor ADD floor_id INT NOT NULL');
$this->addSql('ALTER TABLE corridor ADD CONSTRAINT FK_D6DEE755854679E2 FOREIGN KEY (floor_id) REFERENCES floor (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_D6DEE755854679E2 ON corridor (floor_id)');
$this->addSql('ALTER TABLE floor ADD building_id INT NOT NULL');
$this->addSql('ALTER TABLE floor ADD CONSTRAINT FK_BE45D62E4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_BE45D62E4D2A7E12 ON floor (building_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE place_place DROP CONSTRAINT FK_DD6B48EEFD44781A');
$this->addSql('ALTER TABLE place_place DROP CONSTRAINT FK_DD6B48EEE4A12895');
$this->addSql('DROP TABLE place_place');
$this->addSql('ALTER TABLE floor DROP CONSTRAINT FK_BE45D62E4D2A7E12');
$this->addSql('DROP INDEX IDX_BE45D62E4D2A7E12');
$this->addSql('ALTER TABLE floor DROP building_id');
$this->addSql('ALTER TABLE corridor DROP CONSTRAINT FK_D6DEE755854679E2');
$this->addSql('DROP INDEX IDX_D6DEE755854679E2');
$this->addSql('ALTER TABLE corridor DROP floor_id');
}
}

View File

@ -1,40 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230110162444 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('DROP SEQUENCE corridor_id_seq CASCADE');
$this->addSql('DROP SEQUENCE room_id_seq CASCADE');
$this->addSql('ALTER TABLE corridor ADD CONSTRAINT FK_D6DEE755BF396750 FOREIGN KEY (id) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE place ADD type VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE room ADD CONSTRAINT FK_729F519BBF396750 FOREIGN KEY (id) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('CREATE SEQUENCE corridor_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE room_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('ALTER TABLE room DROP CONSTRAINT FK_729F519BBF396750');
$this->addSql('ALTER TABLE place DROP type');
$this->addSql('ALTER TABLE corridor DROP CONSTRAINT FK_D6DEE755BF396750');
}
}

View File

@ -0,0 +1,124 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230117150847 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE building_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE cylinder_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE floor_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE place_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE plane_surface_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE point_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE poly_surface_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE polyhedron_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE site_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE three_dobject_file_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE building (id INT NOT NULL, site_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_E16F61D4F6BD1646 ON building (site_id)');
$this->addSql('CREATE TABLE corridor (id INT NOT NULL, floor_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_D6DEE755854679E2 ON corridor (floor_id)');
$this->addSql('CREATE TABLE cylinder (id INT NOT NULL, cylinderbase_id INT NOT NULL, room_id INT DEFAULT NULL, height DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_9B045BEA373F1E49 ON cylinder (cylinderbase_id)');
$this->addSql('CREATE INDEX IDX_9B045BEA54177093 ON cylinder (room_id)');
$this->addSql('CREATE TABLE floor (id INT NOT NULL, building_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_BE45D62E4D2A7E12 ON floor (building_id)');
$this->addSql('CREATE TABLE place (id INT NOT NULL, type VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE place_place (place_source INT NOT NULL, place_target INT NOT NULL, PRIMARY KEY(place_source, place_target))');
$this->addSql('CREATE INDEX IDX_DD6B48EEFD44781A ON place_place (place_source)');
$this->addSql('CREATE INDEX IDX_DD6B48EEE4A12895 ON place_place (place_target)');
$this->addSql('CREATE TABLE plane_surface (id INT NOT NULL, polyhedron_id INT DEFAULT NULL, poly_surface_id INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_7D730225A0EC5603 ON plane_surface (polyhedron_id)');
$this->addSql('CREATE INDEX IDX_7D730225E4B18EF4 ON plane_surface (poly_surface_id)');
$this->addSql('CREATE TABLE plane_surface_point (plane_surface_id INT NOT NULL, point_id INT NOT NULL, PRIMARY KEY(plane_surface_id, point_id))');
$this->addSql('CREATE INDEX IDX_359F2C2CA3FD0342 ON plane_surface_point (plane_surface_id)');
$this->addSql('CREATE INDEX IDX_359F2C2CC028CEA2 ON plane_surface_point (point_id)');
$this->addSql('CREATE TABLE point (id INT NOT NULL, x DOUBLE PRECISION NOT NULL, y DOUBLE PRECISION NOT NULL, z DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE poly_surface (id INT NOT NULL, surface_representation_id INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_A643146FDFB7DB2B ON poly_surface (surface_representation_id)');
$this->addSql('CREATE TABLE polyhedron (id INT NOT NULL, room_id INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_768611C054177093 ON polyhedron (room_id)');
$this->addSql('CREATE TABLE room (id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE site (id INT NOT NULL, zero_latitude DOUBLE PRECISION NOT NULL, zero_longitude DOUBLE PRECISION NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE three_dobject_file (id INT NOT NULL, room_id INT DEFAULT NULL, filename VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_6E8C161954177093 ON three_dobject_file (room_id)');
$this->addSql('ALTER TABLE building ADD CONSTRAINT FK_E16F61D4F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE corridor ADD CONSTRAINT FK_D6DEE755854679E2 FOREIGN KEY (floor_id) REFERENCES floor (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE corridor ADD CONSTRAINT FK_D6DEE755BF396750 FOREIGN KEY (id) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE cylinder ADD CONSTRAINT FK_9B045BEA373F1E49 FOREIGN KEY (cylinderbase_id) REFERENCES plane_surface (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE cylinder ADD CONSTRAINT FK_9B045BEA54177093 FOREIGN KEY (room_id) REFERENCES room (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE floor ADD CONSTRAINT FK_BE45D62E4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE place_place ADD CONSTRAINT FK_DD6B48EEFD44781A FOREIGN KEY (place_source) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE place_place ADD CONSTRAINT FK_DD6B48EEE4A12895 FOREIGN KEY (place_target) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE plane_surface ADD CONSTRAINT FK_7D730225A0EC5603 FOREIGN KEY (polyhedron_id) REFERENCES polyhedron (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE plane_surface ADD CONSTRAINT FK_7D730225E4B18EF4 FOREIGN KEY (poly_surface_id) REFERENCES poly_surface (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE plane_surface_point ADD CONSTRAINT FK_359F2C2CA3FD0342 FOREIGN KEY (plane_surface_id) REFERENCES plane_surface (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE plane_surface_point ADD CONSTRAINT FK_359F2C2CC028CEA2 FOREIGN KEY (point_id) REFERENCES point (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE poly_surface ADD CONSTRAINT FK_A643146FDFB7DB2B FOREIGN KEY (surface_representation_id) REFERENCES corridor (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE polyhedron ADD CONSTRAINT FK_768611C054177093 FOREIGN KEY (room_id) REFERENCES room (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE room ADD CONSTRAINT FK_729F519BBF396750 FOREIGN KEY (id) REFERENCES place (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE three_dobject_file ADD CONSTRAINT FK_6E8C161954177093 FOREIGN KEY (room_id) REFERENCES room (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE building_id_seq CASCADE');
$this->addSql('DROP SEQUENCE cylinder_id_seq CASCADE');
$this->addSql('DROP SEQUENCE floor_id_seq CASCADE');
$this->addSql('DROP SEQUENCE place_id_seq CASCADE');
$this->addSql('DROP SEQUENCE plane_surface_id_seq CASCADE');
$this->addSql('DROP SEQUENCE point_id_seq CASCADE');
$this->addSql('DROP SEQUENCE poly_surface_id_seq CASCADE');
$this->addSql('DROP SEQUENCE polyhedron_id_seq CASCADE');
$this->addSql('DROP SEQUENCE site_id_seq CASCADE');
$this->addSql('DROP SEQUENCE three_dobject_file_id_seq CASCADE');
$this->addSql('ALTER TABLE building DROP CONSTRAINT FK_E16F61D4F6BD1646');
$this->addSql('ALTER TABLE corridor DROP CONSTRAINT FK_D6DEE755854679E2');
$this->addSql('ALTER TABLE corridor DROP CONSTRAINT FK_D6DEE755BF396750');
$this->addSql('ALTER TABLE cylinder DROP CONSTRAINT FK_9B045BEA373F1E49');
$this->addSql('ALTER TABLE cylinder DROP CONSTRAINT FK_9B045BEA54177093');
$this->addSql('ALTER TABLE floor DROP CONSTRAINT FK_BE45D62E4D2A7E12');
$this->addSql('ALTER TABLE place_place DROP CONSTRAINT FK_DD6B48EEFD44781A');
$this->addSql('ALTER TABLE place_place DROP CONSTRAINT FK_DD6B48EEE4A12895');
$this->addSql('ALTER TABLE plane_surface DROP CONSTRAINT FK_7D730225A0EC5603');
$this->addSql('ALTER TABLE plane_surface DROP CONSTRAINT FK_7D730225E4B18EF4');
$this->addSql('ALTER TABLE plane_surface_point DROP CONSTRAINT FK_359F2C2CA3FD0342');
$this->addSql('ALTER TABLE plane_surface_point DROP CONSTRAINT FK_359F2C2CC028CEA2');
$this->addSql('ALTER TABLE poly_surface DROP CONSTRAINT FK_A643146FDFB7DB2B');
$this->addSql('ALTER TABLE polyhedron DROP CONSTRAINT FK_768611C054177093');
$this->addSql('ALTER TABLE room DROP CONSTRAINT FK_729F519BBF396750');
$this->addSql('ALTER TABLE three_dobject_file DROP CONSTRAINT FK_6E8C161954177093');
$this->addSql('DROP TABLE building');
$this->addSql('DROP TABLE corridor');
$this->addSql('DROP TABLE cylinder');
$this->addSql('DROP TABLE floor');
$this->addSql('DROP TABLE place');
$this->addSql('DROP TABLE place_place');
$this->addSql('DROP TABLE plane_surface');
$this->addSql('DROP TABLE plane_surface_point');
$this->addSql('DROP TABLE point');
$this->addSql('DROP TABLE poly_surface');
$this->addSql('DROP TABLE polyhedron');
$this->addSql('DROP TABLE room');
$this->addSql('DROP TABLE site');
$this->addSql('DROP TABLE three_dobject_file');
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\SiteRepository;
class MapApiController extends AbstractController
{
#[Route('/map/api')]
public function index(SiteRepository $srep): JsonResponse
{
return $this->json([
'message' => 'Welcome to your new controller!',
'path' => 'src/Controller/MapApiController.php',
'sites' => $srep->allSites()[0]->getZeroLatitude()
]);
}
}

View File

@ -7,27 +7,19 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: BuildingRepository::class)]
* @ORM\Entity(repositoryClass=BuildingRepository::class)
*/
class Building class Building
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
/** #[ORM\ManyToOne(targetEntity: Site::class, inversedBy: "buildings")]
* @ORM\ManyToOne(targetEntity=Site::class, inversedBy="buildings") #[ORM\JoinColumn(nullable: false)]
* @ORM\JoinColumn(nullable=false)
*/
private $site; private $site;
/** #[ORM\OneToMany(targetEntity: Floor::class, mappedBy: "building")]
* @ORM\OneToMany(targetEntity=Floor::class, mappedBy="building")
*/
private $floors; private $floors;
public function __construct() public function __construct()

View File

@ -3,24 +3,17 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\CorridorRepository; use App\Repository\CorridorRepository;
use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: CorridorRepository::class)]
* @ORM\Entity(repositoryClass=CorridorRepository::class)
*/
class Corridor extends Place class Corridor extends Place
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
/** #[ORM\ManyToOne(targetEntity: Floor::class, inversedBy: "corridors")]
* @ORM\ManyToOne(targetEntity=Floor::class, inversedBy="corridors") #[ORM\JoinColumn(nullable: false)]
* @ORM\JoinColumn(nullable=false)
*/
private $floor; private $floor;
public function getId(): ?int public function getId(): ?int

66
src/Entity/Cylinder.php Normal file
View File

@ -0,0 +1,66 @@
<?php
namespace App\Entity;
use App\Repository\CylinderRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CylinderRepository::class)]
class Cylinder
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[ORM\Column(type: "float")]
private $height;
#[ORM\OneToOne(targetEntity: PlaneSurface::class, cascade: {"persist", "remove"})]
#[ORM\JoinColumn(nullable: false)]
private $cylinderbase;
#[ORM\ManyToOne(targetEntity: Room::class, inversedBy: "CylinderRepresentation")]
private $room;
public function getId(): ?int
{
return $this->id;
}
public function getHeight(): ?float
{
return $this->height;
}
public function setHeight(float $height): self
{
$this->height = $height;
return $this;
}
public function getCylinderbase(): ?PlaneSurface
{
return $this->cylinderbase;
}
public function setCylinderbase(PlaneSurface $cylinderbase): self
{
$this->cylinderbase = $cylinderbase;
return $this;
}
public function getRoom(): ?Room
{
return $this->room;
}
public function setRoom(?Room $room): self
{
$this->room = $room;
return $this;
}
}

View File

@ -7,27 +7,19 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: FloorRepository::class)]
* @ORM\Entity(repositoryClass=FloorRepository::class)
*/
class Floor class Floor
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
/** #[ORM\ManyToOne(targetEntity: Building::class, inversedBy: "floors")]
* @ORM\ManyToOne(targetEntity=Building::class, inversedBy="floors") #[ORM\JoinColumn(nullable: false)]
* @ORM\JoinColumn(nullable=false)
*/
private $building; private $building;
/** #[ORM\OneToMany(targetEntity: Corridor::class, mappedBy: "floor")]
* @ORM\OneToMany(targetEntity=Corridor::class, mappedBy="floor")
*/
private $corridors; private $corridors;
public function __construct() public function __construct()

View File

@ -7,29 +7,21 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: PlaceRepository::class)]
* @ORM\Entity(repositoryClass=PlaceRepository::class) #[ORM\InheritanceType("JOINED")]
* @ORM\InheritanceType("JOINED") #[ORM\DiscriminatorColumn(name: "type", type: "string")]
* @ORM\DiscriminatorColumn(name="type", type="string") #[ORM\DiscriminatorMap({"room": "Room","corridor": "Corridor"})]
* @ORM\DiscriminatorMap({"room"="Room","corridor"="Corridor"})
*/
class Place class Place
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
/** #[ORM\ManyToMany(targetEntity: Place::class, inversedBy: "connectedPlaces")]
* @ORM\ManyToMany(targetEntity=Place::class, inversedBy="connectedPlaces")
*/
private $connection; private $connection;
/** #[ORM\ManyToMany(targetEntity: Place::class, mappedBy: "connection")]
* @ORM\ManyToMany(targetEntity=Place::class, mappedBy="connection")
*/
private $connectedPlaces; private $connectedPlaces;
public function __construct() public function __construct()

View File

@ -0,0 +1,84 @@
<?php
namespace App\Entity;
use App\Repository\PlaneSurfaceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PlaneSurfaceRepository::class)]
class PlaneSurface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[ORM\ManyToMany(targetEntity: Point::class)]
private $polygonpoint;
#[ORM\ManyToOne(targetEntity: Polyhedron::class, inversedBy: "polyhedronface")]
private $polyhedron;
#[ORM\ManyToOne(targetEntity: PolySurface::class, inversedBy: "polysurfaceComponent")]
private $polySurface;
public function __construct()
{
$this->polygonpoint = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection<int, Point>
*/
public function getPolygonpoint(): Collection
{
return $this->polygonpoint;
}
public function addPolygonpoint(Point $polygonpoint): self
{
if (!$this->polygonpoint->contains($polygonpoint)) {
$this->polygonpoint[] = $polygonpoint;
}
return $this;
}
public function removePolygonpoint(Point $polygonpoint): self
{
$this->polygonpoint->removeElement($polygonpoint);
return $this;
}
public function getPolyhedron(): ?Polyhedron
{
return $this->polyhedron;
}
public function setPolyhedron(?Polyhedron $polyhedron): self
{
$this->polyhedron = $polyhedron;
return $this;
}
public function getPolySurface(): ?PolySurface
{
return $this->polySurface;
}
public function setPolySurface(?PolySurface $polySurface): self
{
$this->polySurface = $polySurface;
return $this;
}
}

65
src/Entity/Point.php Normal file
View File

@ -0,0 +1,65 @@
<?php
namespace App\Entity;
use App\Repository\PointRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PointRepository::class)]
class Point
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[ORM\Column(type: "float")]
private $x;
#[ORM\Column(type: "float")]
private $y;
#[ORM\Column(type: "float")]
private $z;
public function getId(): ?int
{
return $this->id;
}
public function getX(): ?float
{
return $this->x;
}
public function setX(float $x): self
{
$this->x = $x;
return $this;
}
public function getY(): ?float
{
return $this->y;
}
public function setY(float $y): self
{
$this->y = $y;
return $this;
}
public function getZ(): ?float
{
return $this->z;
}
public function setZ(float $z): self
{
$this->z = $z;
return $this;
}
}

View File

@ -0,0 +1,75 @@
<?php
namespace App\Entity;
use App\Repository\PolySurfaceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PolySurfaceRepository::class)]
class PolySurface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[ORM\OneToMany(targetEntity: PlaneSurface::class, mappedBy: "polySurface")]
private $polysurfaceComponent;
#[ORM\ManyToOne(targetEntity: Corridor::class)]
private $SurfaceRepresentation;
public function __construct()
{
$this->polysurfaceComponent = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection<int, PlaneSurface>
*/
public function getPolysurfaceComponent(): Collection
{
return $this->polysurfaceComponent;
}
public function addPolysurfaceComponent(PlaneSurface $polysurfaceComponent): self
{
if (!$this->polysurfaceComponent->contains($polysurfaceComponent)) {
$this->polysurfaceComponent[] = $polysurfaceComponent;
$polysurfaceComponent->setPolySurface($this);
}
return $this;
}
public function removePolysurfaceComponent(PlaneSurface $polysurfaceComponent): self
{
if ($this->polysurfaceComponent->removeElement($polysurfaceComponent)) {
// set the owning side to null (unless already changed)
if ($polysurfaceComponent->getPolySurface() === $this) {
$polysurfaceComponent->setPolySurface(null);
}
}
return $this;
}
public function getSurfaceRepresentation(): ?Corridor
{
return $this->SurfaceRepresentation;
}
public function setSurfaceRepresentation(?Corridor $SurfaceRepresentation): self
{
$this->SurfaceRepresentation = $SurfaceRepresentation;
return $this;
}
}

75
src/Entity/Polyhedron.php Normal file
View File

@ -0,0 +1,75 @@
<?php
namespace App\Entity;
use App\Repository\PolyhedronRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PolyhedronRepository::class)]
class Polyhedron
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[ORM\OneToMany(targetEntity: PlaneSurface::class, mappedBy: "polyhedron")]
private $polyhedronface;
#[ORM\ManyToOne(targetEntity: Room::class, inversedBy: "PolyhedronRepresentation")]
private $room;
public function __construct()
{
$this->polyhedronface = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection<int, PlaneSurface>
*/
public function getPolyhedronface(): Collection
{
return $this->polyhedronface;
}
public function addPolyhedronface(PlaneSurface $polyhedronface): self
{
if (!$this->polyhedronface->contains($polyhedronface)) {
$this->polyhedronface[] = $polyhedronface;
$polyhedronface->setPolyhedron($this);
}
return $this;
}
public function removePolyhedronface(PlaneSurface $polyhedronface): self
{
if ($this->polyhedronface->removeElement($polyhedronface)) {
// set the owning side to null (unless already changed)
if ($polyhedronface->getPolyhedron() === $this) {
$polyhedronface->setPolyhedron(null);
}
}
return $this;
}
public function getRoom(): ?Room
{
return $this->room;
}
public function setRoom(?Room $room): self
{
$this->room = $room;
return $this;
}
}

View File

@ -3,22 +3,127 @@
namespace App\Entity; namespace App\Entity;
use App\Repository\RoomRepository; use App\Repository\RoomRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: RoomRepository::class)]
* @ORM\Entity(repositoryClass=RoomRepository::class)
*/
class Room extends Place class Room extends Place
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
#[ORM\OneToMany(targetEntity: ThreeDObjectFile::class, mappedBy: "room")]
private $ComplexRepresentation;
#[ORM\OneToMany(targetEntity: Polyhedron::class, mappedBy: "room")]
private $PolyhedronRepresentation;
#[ORM\OneToMany(targetEntity: Cylinder::class, mappedBy: "room")]
private $CylinderRepresentation;
public function __construct()
{
parent::__construct();
$this->ComplexRepresentation = new ArrayCollection();
$this->PolyhedronRepresentation = new ArrayCollection();
$this->CylinderRepresentation = new ArrayCollection();
}
public function getId(): ?int public function getId(): ?int
{ {
return $this->id; return $this->id;
} }
/**
* @return Collection<int, ThreeDObjectFile>
*/
public function getComplexRepresentation(): Collection
{
return $this->ComplexRepresentation;
}
public function addComplexRepresentation(ThreeDObjectFile $complexRepresentation): self
{
if (!$this->ComplexRepresentation->contains($complexRepresentation)) {
$this->ComplexRepresentation[] = $complexRepresentation;
$complexRepresentation->setRoom($this);
}
return $this;
}
public function removeComplexRepresentation(ThreeDObjectFile $complexRepresentation): self
{
if ($this->ComplexRepresentation->removeElement($complexRepresentation)) {
// set the owning side to null (unless already changed)
if ($complexRepresentation->getRoom() === $this) {
$complexRepresentation->setRoom(null);
}
}
return $this;
}
/**
* @return Collection<int, Polyhedron>
*/
public function getPolyhedronRepresentation(): Collection
{
return $this->PolyhedronRepresentation;
}
public function addPolyhedronRepresentation(Polyhedron $polyhedronRepresentation): self
{
if (!$this->PolyhedronRepresentation->contains($polyhedronRepresentation)) {
$this->PolyhedronRepresentation[] = $polyhedronRepresentation;
$polyhedronRepresentation->setRoom($this);
}
return $this;
}
public function removePolyhedronRepresentation(Polyhedron $polyhedronRepresentation): self
{
if ($this->PolyhedronRepresentation->removeElement($polyhedronRepresentation)) {
// set the owning side to null (unless already changed)
if ($polyhedronRepresentation->getRoom() === $this) {
$polyhedronRepresentation->setRoom(null);
}
}
return $this;
}
/**
* @return Collection<int, Cylinder>
*/
public function getCylinderRepresentation(): Collection
{
return $this->CylinderRepresentation;
}
public function addCylinderRepresentation(Cylinder $cylinderRepresentation): self
{
if (!$this->CylinderRepresentation->contains($cylinderRepresentation)) {
$this->CylinderRepresentation[] = $cylinderRepresentation;
$cylinderRepresentation->setRoom($this);
}
return $this;
}
public function removeCylinderRepresentation(Cylinder $cylinderRepresentation): self
{
if ($this->CylinderRepresentation->removeElement($cylinderRepresentation)) {
// set the owning side to null (unless already changed)
if ($cylinderRepresentation->getRoom() === $this) {
$cylinderRepresentation->setRoom(null);
}
}
return $this;
}
} }

View File

@ -7,31 +7,21 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** #[ORM\Entity(repositoryClass: SiteRepository::class)]
* @ORM\Entity(repositoryClass=SiteRepository::class)
*/
class Site class Site
{ {
/** #[ORM\Id]
* @ORM\Id #[ORM\GeneratedValue]
* @ORM\GeneratedValue #[ORM\Column(type: "integer")]
* @ORM\Column(type="integer")
*/
private $id; private $id;
/** #[ORM\Column(type: "float")]
* @ORM\Column(type="float")
*/
private $zeroLatitude; private $zeroLatitude;
/** #[ORM\Column(type: "float")]
* @ORM\Column(type="float")
*/
private $zeroLongitude; private $zeroLongitude;
/** #[ORM\OneToMany(targetEntity: Building::class, mappedBy: "site")]
* @ORM\OneToMany(targetEntity=Building::class, mappedBy="site")
*/
private $buildings; private $buildings;
public function __construct() public function __construct()

View File

@ -0,0 +1,50 @@
<?php
namespace App\Entity;
use App\Repository\ThreeDObjectFileRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ThreeDObjectFileRepository::class)]
class ThreeDObjectFile
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
private $id;
#[@ORM\Column(type: "string", length: 255)]
private $filename;
#[@ORM\ManyToOne(targetEntity: Room::class, inversedBy: "ComplexRepresentation")]
private $room;
public function getId(): ?int
{
return $this->id;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getRoom(): ?Room
{
return $this->room;
}
public function setRoom(?Room $room): self
{
$this->room = $room;
return $this;
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\Cylinder;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Cylinder>
*
* @method Cylinder|null find($id, $lockMode = null, $lockVersion = null)
* @method Cylinder|null findOneBy(array $criteria, array $orderBy = null)
* @method Cylinder[] findAll()
* @method Cylinder[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class CylinderRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Cylinder::class);
}
public function add(Cylinder $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(Cylinder $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return Cylinder[] Returns an array of Cylinder objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('c')
// ->andWhere('c.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('c.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Cylinder
// {
// return $this->createQueryBuilder('c')
// ->andWhere('c.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\PlaneSurface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<PlaneSurface>
*
* @method PlaneSurface|null find($id, $lockMode = null, $lockVersion = null)
* @method PlaneSurface|null findOneBy(array $criteria, array $orderBy = null)
* @method PlaneSurface[] findAll()
* @method PlaneSurface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PlaneSurfaceRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, PlaneSurface::class);
}
public function add(PlaneSurface $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(PlaneSurface $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return PlaneSurface[] Returns an array of PlaneSurface objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('p.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?PlaneSurface
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\Point;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Point>
*
* @method Point|null find($id, $lockMode = null, $lockVersion = null)
* @method Point|null findOneBy(array $criteria, array $orderBy = null)
* @method Point[] findAll()
* @method Point[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PointRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Point::class);
}
public function add(Point $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(Point $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return Point[] Returns an array of Point objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('p.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Point
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\PolySurface;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<PolySurface>
*
* @method PolySurface|null find($id, $lockMode = null, $lockVersion = null)
* @method PolySurface|null findOneBy(array $criteria, array $orderBy = null)
* @method PolySurface[] findAll()
* @method PolySurface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PolySurfaceRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, PolySurface::class);
}
public function add(PolySurface $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(PolySurface $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return PolySurface[] Returns an array of PolySurface objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('p.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?PolySurface
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\Polyhedron;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Polyhedron>
*
* @method Polyhedron|null find($id, $lockMode = null, $lockVersion = null)
* @method Polyhedron|null findOneBy(array $criteria, array $orderBy = null)
* @method Polyhedron[] findAll()
* @method Polyhedron[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class PolyhedronRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Polyhedron::class);
}
public function add(Polyhedron $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(Polyhedron $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return Polyhedron[] Returns an array of Polyhedron objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('p.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Polyhedron
// {
// return $this->createQueryBuilder('p')
// ->andWhere('p.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -38,6 +38,11 @@ class SiteRepository extends ServiceEntityRepository
$this->getEntityManager()->flush(); $this->getEntityManager()->flush();
} }
} }
public function allSites(): array
{
return $this->createQueryBuilder('s')->orderBy('s.id','ASC')->getQuery()->getResult();
}
// /** // /**
// * @return Site[] Returns an array of Site objects // * @return Site[] Returns an array of Site objects

View File

@ -0,0 +1,66 @@
<?php
namespace App\Repository;
use App\Entity\ThreeDObjectFile;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<ThreeDObjectFile>
*
* @method ThreeDObjectFile|null find($id, $lockMode = null, $lockVersion = null)
* @method ThreeDObjectFile|null findOneBy(array $criteria, array $orderBy = null)
* @method ThreeDObjectFile[] findAll()
* @method ThreeDObjectFile[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ThreeDObjectFileRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ThreeDObjectFile::class);
}
public function add(ThreeDObjectFile $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(ThreeDObjectFile $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /**
// * @return ThreeDObjectFile[] Returns an array of ThreeDObjectFile objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('t')
// ->andWhere('t.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('t.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?ThreeDObjectFile
// {
// return $this->createQueryBuilder('t')
// ->andWhere('t.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@ -1,23 +1,11 @@
{ {
"doctrine/annotations": {
"version": "1.13",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/doctrine-bundle": { "doctrine/doctrine-bundle": {
"version": "2.7", "version": "2.8",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
"version": "2.4", "version": "2.8",
"ref": "da713d006953b90d1c085c1be480ecdd6c4a95e0" "ref": "c38df294eea859b4e2d5f252d4e973f55a264f84"
}, },
"files": [ "files": [
"config/packages/doctrine.yaml", "config/packages/doctrine.yaml",
@ -39,7 +27,7 @@
] ]
}, },
"symfony/console": { "symfony/console": {
"version": "5.4", "version": "6.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
@ -51,7 +39,7 @@
] ]
}, },
"symfony/flex": { "symfony/flex": {
"version": "1.19", "version": "2.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
@ -63,12 +51,12 @@
] ]
}, },
"symfony/framework-bundle": { "symfony/framework-bundle": {
"version": "5.4", "version": "6.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
"version": "5.4", "version": "6.2",
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb" "ref": "af47254c5e4cd543e6af3e4508298ffebbdaddd3"
}, },
"files": [ "files": [
"config/packages/cache.yaml", "config/packages/cache.yaml",
@ -82,7 +70,7 @@
] ]
}, },
"symfony/maker-bundle": { "symfony/maker-bundle": {
"version": "1.43", "version": "1.48",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
@ -91,12 +79,12 @@
} }
}, },
"symfony/routing": { "symfony/routing": {
"version": "5.4", "version": "6.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "main",
"version": "5.3", "version": "6.2",
"ref": "85de1d8ae45b284c3c84b668171d2615049e698f" "ref": "e0a11b4ccb8c9e70b574ff5ad3dfdcd41dec5aa6"
}, },
"files": [ "files": [
"config/packages/routing.yaml", "config/packages/routing.yaml",