welcome back to dyb-tech
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<parameter key="doctrine.dbal.configuration.class">Doctrine\DBAL\Configuration</parameter>
|
||||
<parameter key="doctrine.data_collector.class">Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector</parameter>
|
||||
<parameter key="doctrine.dbal.connection.event_manager.class">Symfony\Bridge\Doctrine\ContainerAwareEventManager</parameter>
|
||||
<parameter key="doctrine.dbal.connection_factory.class">Doctrine\Bundle\DoctrineBundle\ConnectionFactory</parameter>
|
||||
<parameter key="doctrine.dbal.events.mysql_session_init.class">Doctrine\DBAL\Event\Listeners\MysqlSessionInit</parameter>
|
||||
<parameter key="doctrine.dbal.events.oracle_session_init.class">Doctrine\DBAL\Event\Listeners\OracleSessionInit</parameter>
|
||||
<parameter key="doctrine.class">Doctrine\Bundle\DoctrineBundle\Registry</parameter>
|
||||
<parameter key="doctrine.entity_managers" type="collection"></parameter>
|
||||
<parameter key="doctrine.default_entity_manager"></parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="Doctrine\DBAL\Connection" alias="database_connection" public="false" />
|
||||
|
||||
<service id="data_collector.doctrine" class="%doctrine.data_collector.class%" public="false">
|
||||
<tag name="data_collector" template="@Doctrine/Collector/db.html.twig" id="db" priority="250" />
|
||||
<argument type="service" id="doctrine" />
|
||||
<argument>true</argument>
|
||||
<argument type="service" id="doctrine.debug_data_holder" on-invalid="null"/>
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.connection_factory" class="%doctrine.dbal.connection_factory.class%">
|
||||
<argument>%doctrine.dbal.connection_factory.types%</argument>
|
||||
<argument type="service" id="doctrine.dbal.connection_factory.dsn_parser" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.connection_factory.dsn_parser" class="Doctrine\DBAL\Tools\DsnParser">
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.connection" class="Doctrine\DBAL\Connection" abstract="true">
|
||||
<factory service="doctrine.dbal.connection_factory" method="createConnection" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.connection.event_manager" class="%doctrine.dbal.connection.event_manager.class%" public="false" abstract="true">
|
||||
<argument type="service" id="service_container" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.connection.configuration" class="%doctrine.dbal.configuration.class%" public="false" abstract="true" />
|
||||
|
||||
<service id="doctrine" class="%doctrine.class%" public="true">
|
||||
<argument type="service" id="service_container" />
|
||||
<argument>%doctrine.connections%</argument>
|
||||
<argument>%doctrine.entity_managers%</argument>
|
||||
<argument>%doctrine.default_connection%</argument>
|
||||
<argument>%doctrine.default_entity_manager%</argument>
|
||||
<tag name="kernel.reset" method="reset" />
|
||||
</service>
|
||||
<service id="Doctrine\Persistence\ManagerRegistry" alias="doctrine" public="false" />
|
||||
<service id="Doctrine\Common\Persistence\ManagerRegistry" alias="doctrine" public="false" />
|
||||
|
||||
<service id="doctrine.twig.doctrine_extension" class="Doctrine\Bundle\DoctrineBundle\Twig\DoctrineExtension" public="false">
|
||||
<tag name="twig.extension" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.schema_asset_filter_manager" class="Doctrine\Bundle\DoctrineBundle\Dbal\SchemaAssetsFilterManager" public="false" abstract="true">
|
||||
<!-- schema assets filters -->
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.well_known_schema_asset_filter" class="Doctrine\Bundle\DoctrineBundle\Dbal\BlacklistSchemaAssetFilter" public="false">
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
|
||||
<!-- commands -->
|
||||
<service id="doctrine.database_create_command" class="Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand">
|
||||
<argument type="service" id="doctrine" />
|
||||
|
||||
<tag name="console.command" command="doctrine:database:create" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.database_drop_command" class="Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand">
|
||||
<argument type="service" id="doctrine" />
|
||||
|
||||
<tag name="console.command" command="doctrine:database:drop" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.query_sql_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunSqlDoctrineCommand">
|
||||
<argument type="service" id="Doctrine\Bundle\DoctrineBundle\Dbal\ManagerRegistryAwareConnectionProvider" on-invalid="null" />
|
||||
|
||||
<tag name="console.command" command="doctrine:query:sql" />
|
||||
</service>
|
||||
|
||||
<service id="Doctrine\DBAL\Tools\Console\Command\RunSqlCommand">
|
||||
<argument type="service" id="Doctrine\Bundle\DoctrineBundle\Dbal\ManagerRegistryAwareConnectionProvider" on-invalid="null" />
|
||||
|
||||
<tag name="console.command" command="dbal:run-sql" />
|
||||
</service>
|
||||
|
||||
<service id="Doctrine\Bundle\DoctrineBundle\Controller\ProfilerController">
|
||||
<argument type="service" id="twig" />
|
||||
<argument type="service" id="doctrine" />
|
||||
<argument type="service" id="profiler" />
|
||||
|
||||
<tag name="controller.service_arguments" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.dbal.default_schema_manager_factory" class="Doctrine\DBAL\Schema\DefaultSchemaManagerFactory" />
|
||||
<service id="doctrine.dbal.legacy_schema_manager_factory" class="Doctrine\DBAL\Schema\LegacySchemaManagerFactory" />
|
||||
|
||||
</services>
|
||||
</container>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<services>
|
||||
<!--
|
||||
The following service isn't prefixed by the "doctrine.orm" namespace in order for end-users to just use
|
||||
the "doctrine_transaction" shortcut in message buses middleware config
|
||||
-->
|
||||
<service id="messenger.middleware.doctrine_transaction" class="Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware" abstract="true" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The following service isn't prefixed by the "doctrine.orm" namespace in order for end-users to just use
|
||||
the "doctrine_ping_connection" shortcut in message buses middleware config
|
||||
-->
|
||||
<service id="messenger.middleware.doctrine_ping_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrinePingConnectionMiddleware" abstract="true" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The following service isn't prefixed by the "doctrine.orm" namespace in order for end-users to just use
|
||||
the "doctrine_close_connection" shortcut in message buses middleware config
|
||||
-->
|
||||
<service id="messenger.middleware.doctrine_close_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrineCloseConnectionMiddleware" abstract="true" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The following service isn't prefixed by the "doctrine.orm" namespace in order for end-users to just use
|
||||
the "doctrine_open_transaction_logger" shortcut in message buses middleware config
|
||||
-->
|
||||
<service id="messenger.middleware.doctrine_open_transaction_logger" class="Symfony\Bridge\Doctrine\Messenger\DoctrineOpenTransactionLoggerMiddleware" abstract="true" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
<argument>null</argument>
|
||||
<argument type="service" id="logger" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.messenger.event_subscriber.doctrine_clear_entity_manager" class="Symfony\Bridge\Doctrine\Messenger\DoctrineClearEntityManagerWorkerSubscriber" public="false">
|
||||
<tag name="kernel.event_subscriber" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!--
|
||||
The services below will be removed conditionally in DoctrineExtension, if symfony/doctrine-messenger is not installed.
|
||||
-->
|
||||
<service id="messenger.transport.doctrine.factory" class="Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransportFactory" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
<tag name="messenger.transport_factory" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.messenger.doctrine_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\MessengerTransportDoctrineSchemaSubscriber">
|
||||
<argument type="tagged" tag="messenger.receiver" />
|
||||
<tag name="doctrine.event_subscriber" />
|
||||
</service>
|
||||
<service id="doctrine.orm.messenger.doctrine_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\MessengerTransportDoctrineSchemaListener">
|
||||
<argument type="tagged" tag="messenger.receiver" />
|
||||
<tag name="doctrine.event_listener" event="postGenerateSchema" />
|
||||
<tag name="doctrine.event_listener" event="onSchemaCreateTable" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<services>
|
||||
<service id="doctrine.dbal.logging_middleware" class="Doctrine\DBAL\Logging\Middleware" abstract="true">
|
||||
<argument type="service" id="logger" />
|
||||
<tag name="monolog.logger" channel="doctrine" />
|
||||
</service>
|
||||
<service id="doctrine.debug_data_holder" class="Doctrine\Bundle\DoctrineBundle\Middleware\BacktraceDebugDataHolder">
|
||||
<argument type="collection" />
|
||||
<tag name="kernel.reset" method="reset" />
|
||||
</service>
|
||||
<service id="doctrine.dbal.debug_middleware" class="Doctrine\Bundle\DoctrineBundle\Middleware\DebugMiddleware" abstract="true">
|
||||
<argument type="service" id="doctrine.debug_data_holder" />
|
||||
<argument type="service" id="debug.stopwatch" on-invalid="null" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
@@ -0,0 +1,277 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<parameter key="doctrine.orm.configuration.class">Doctrine\ORM\Configuration</parameter>
|
||||
<parameter key="doctrine.orm.entity_manager.class">Doctrine\ORM\EntityManager</parameter>
|
||||
<parameter key="doctrine.orm.manager_configurator.class">Doctrine\Bundle\DoctrineBundle\ManagerConfigurator</parameter>
|
||||
|
||||
<!-- cache -->
|
||||
<parameter key="doctrine.orm.cache.array.class">Doctrine\Common\Cache\ArrayCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.apc.class">Doctrine\Common\Cache\ApcCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcache.class">Doctrine\Common\Cache\MemcacheCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcache_host">localhost</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcache_port">11211</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcache_instance.class">Memcache</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcached.class">Doctrine\Common\Cache\MemcachedCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcached_host">localhost</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcached_port">11211</parameter>
|
||||
<parameter key="doctrine.orm.cache.memcached_instance.class">Memcached</parameter>
|
||||
<parameter key="doctrine.orm.cache.redis.class">Doctrine\Common\Cache\RedisCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.redis_host">localhost</parameter>
|
||||
<parameter key="doctrine.orm.cache.redis_port">6379</parameter>
|
||||
<parameter key="doctrine.orm.cache.redis_instance.class">Redis</parameter>
|
||||
<parameter key="doctrine.orm.cache.xcache.class">Doctrine\Common\Cache\XcacheCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.wincache.class">Doctrine\Common\Cache\WinCacheCache</parameter>
|
||||
<parameter key="doctrine.orm.cache.zenddata.class">Doctrine\Common\Cache\ZendDataCache</parameter>
|
||||
|
||||
<!-- metadata -->
|
||||
<parameter key="doctrine.orm.metadata.driver_chain.class">Doctrine\Persistence\Mapping\Driver\MappingDriverChain</parameter>
|
||||
<parameter key="doctrine.orm.metadata.annotation.class">Doctrine\ORM\Mapping\Driver\AnnotationDriver</parameter>
|
||||
<parameter key="doctrine.orm.metadata.xml.class">Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver</parameter>
|
||||
<parameter key="doctrine.orm.metadata.yml.class">Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver</parameter>
|
||||
<parameter key="doctrine.orm.metadata.php.class">Doctrine\ORM\Mapping\Driver\PHPDriver</parameter>
|
||||
<parameter key="doctrine.orm.metadata.staticphp.class">Doctrine\ORM\Mapping\Driver\StaticPHPDriver</parameter>
|
||||
<parameter key="doctrine.orm.metadata.attribute.class">Doctrine\ORM\Mapping\Driver\AttributeDriver</parameter>
|
||||
|
||||
<!-- cache warmer -->
|
||||
<parameter key="doctrine.orm.proxy_cache_warmer.class">Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer</parameter>
|
||||
|
||||
<!-- form field factory guesser -->
|
||||
<parameter key="form.type_guesser.doctrine.class">Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser</parameter>
|
||||
|
||||
<!-- validator -->
|
||||
<parameter key="doctrine.orm.validator.unique.class">Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator</parameter>
|
||||
<parameter key="doctrine.orm.validator_initializer.class">Symfony\Bridge\Doctrine\Validator\DoctrineInitializer</parameter>
|
||||
|
||||
<!-- security -->
|
||||
<parameter key="doctrine.orm.security.user.provider.class">Symfony\Bridge\Doctrine\Security\User\EntityUserProvider</parameter>
|
||||
|
||||
<!-- listeners -->
|
||||
<parameter key="doctrine.orm.listeners.resolve_target_entity.class">Doctrine\ORM\Tools\ResolveTargetEntityListener</parameter>
|
||||
<parameter key="doctrine.orm.listeners.attach_entity_listeners.class">Doctrine\ORM\Tools\AttachEntityListenersListener</parameter>
|
||||
|
||||
<!-- naming strategy -->
|
||||
<parameter key="doctrine.orm.naming_strategy.default.class">Doctrine\ORM\Mapping\DefaultNamingStrategy</parameter>
|
||||
<parameter key="doctrine.orm.naming_strategy.underscore.class">Doctrine\ORM\Mapping\UnderscoreNamingStrategy</parameter>
|
||||
|
||||
<!-- quote strategy -->
|
||||
<parameter key="doctrine.orm.quote_strategy.default.class">Doctrine\ORM\Mapping\DefaultQuoteStrategy</parameter>
|
||||
<parameter key="doctrine.orm.quote_strategy.ansi.class">Doctrine\ORM\Mapping\AnsiQuoteStrategy</parameter>
|
||||
|
||||
<!-- entity listener resolver -->
|
||||
<parameter key="doctrine.orm.entity_listener_resolver.class">Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver</parameter>
|
||||
|
||||
<!-- second level cache -->
|
||||
<parameter key="doctrine.orm.second_level_cache.default_cache_factory.class">Doctrine\ORM\Cache\DefaultCacheFactory</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.default_region.class">Doctrine\ORM\Cache\Region\DefaultRegion</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.filelock_region.class">Doctrine\ORM\Cache\Region\FileLockRegion</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.logger_chain.class">Doctrine\ORM\Cache\Logging\CacheLoggerChain</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.logger_statistics.class">Doctrine\ORM\Cache\Logging\StatisticsCacheLogger</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.cache_configuration.class">Doctrine\ORM\Cache\CacheConfiguration</parameter>
|
||||
<parameter key="doctrine.orm.second_level_cache.regions_configuration.class">Doctrine\ORM\Cache\RegionsConfiguration</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="Doctrine\ORM\EntityManagerInterface" alias="doctrine.orm.entity_manager" public="false" />
|
||||
|
||||
<!--- Internal Annotation Metadata Reader Service alias, use annotation_reader service -->
|
||||
<service id="doctrine.orm.metadata.annotation_reader" alias="annotation_reader" public="false" />
|
||||
|
||||
<service id="doctrine.orm.proxy_cache_warmer" class="%doctrine.orm.proxy_cache_warmer.class%" public="false">
|
||||
<tag name="kernel.cache_warmer" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<service id="form.type_guesser.doctrine" class="%form.type_guesser.doctrine.class%">
|
||||
<tag name="form.type_guesser" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<service id="form.type.entity" class="Symfony\Bridge\Doctrine\Form\Type\EntityType">
|
||||
<tag name="form.type" alias="entity" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.configuration" class="%doctrine.orm.configuration.class%" abstract="true" public="false" />
|
||||
|
||||
<service id="doctrine.orm.entity_manager.abstract" class="%doctrine.orm.entity_manager.class%" abstract="true" lazy="true" />
|
||||
|
||||
<service id="doctrine.orm.container_repository_factory" class="Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory" public="false">
|
||||
<argument type="service">
|
||||
<service class="Symfony\Component\DependencyInjection\ServiceLocator">
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
</argument>
|
||||
</service>
|
||||
|
||||
<!-- The configurator cannot be a private service -->
|
||||
<service id="doctrine.orm.manager_configurator.abstract" class="%doctrine.orm.manager_configurator.class%" abstract="true">
|
||||
<argument type="collection" />
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
|
||||
<!-- validator -->
|
||||
<service id="doctrine.orm.validator.unique" class="%doctrine.orm.validator.unique.class%">
|
||||
<tag name="validator.constraint_validator" alias="doctrine.orm.validator.unique" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.validator_initializer" class="%doctrine.orm.validator_initializer.class%">
|
||||
<tag name="validator.initializer" />
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!-- security -->
|
||||
<service id="doctrine.orm.security.user.provider" class="%doctrine.orm.security.user.provider.class%" abstract="true" public="false">
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<!-- listeners -->
|
||||
<service id="doctrine.orm.listeners.resolve_target_entity" class="%doctrine.orm.listeners.resolve_target_entity.class%" public="false" />
|
||||
<service id="doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaSubscriber">
|
||||
<argument type="collection" /> <!-- DoctrineDbalAdapter instances -->
|
||||
<tag name="doctrine.event_subscriber" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.doctrine_dbal_cache_adapter_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaListener">
|
||||
<argument type="collection" /> <!-- DoctrineDbalAdapter instances -->
|
||||
<tag name="doctrine.event_listener" event="postGenerateSchema" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.pdo_cache_adapter_doctrine_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\PdoCacheAdapterDoctrineSchemaSubscriber">
|
||||
<argument type="collection" /> <!-- PdoAdapter instances -->
|
||||
<tag name="doctrine.event_subscriber" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.doctrine_token_provider_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaSubscriber">
|
||||
<argument type="tagged" tag="security.remember_me_handler" />
|
||||
<tag name="doctrine.event_subscriber" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.doctrine_token_provider_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaListener">
|
||||
<argument type="tagged" tag="security.remember_me_handler" />
|
||||
<tag name="doctrine.event_listener" event="postGenerateSchema" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.pdo_session_handler_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\PdoSessionHandlerSchemaListener">
|
||||
<argument type="service" id="session.handler" />
|
||||
<tag name="doctrine.event_listener" event="postGenerateSchema" />
|
||||
</service>
|
||||
<service id="doctrine.orm.listeners.lock_store_schema_listener" class="Symfony\Bridge\Doctrine\SchemaListener\LockStoreSchemaListener">
|
||||
<argument type="tagged" tag="lock.store" />
|
||||
<tag name="doctrine.event_listener" event="postGenerateSchema" />
|
||||
</service>
|
||||
|
||||
<!-- naming strategy -->
|
||||
<service id="doctrine.orm.naming_strategy.default" class="%doctrine.orm.naming_strategy.default.class%" public="false" />
|
||||
<service id="doctrine.orm.naming_strategy.underscore" class="%doctrine.orm.naming_strategy.underscore.class%" public="false" />
|
||||
<service id="doctrine.orm.naming_strategy.underscore_number_aware" class="%doctrine.orm.naming_strategy.underscore.class%" public="false">
|
||||
<argument type="constant">CASE_LOWER</argument>
|
||||
<argument>true</argument>
|
||||
</service>
|
||||
|
||||
<!-- quote strategy -->
|
||||
<service id="doctrine.orm.quote_strategy.default" class="%doctrine.orm.quote_strategy.default.class%" public="false" />
|
||||
<service id="doctrine.orm.quote_strategy.ansi" class="%doctrine.orm.quote_strategy.ansi.class%" public="false" />
|
||||
|
||||
<!-- custom id generators -->
|
||||
<service id="doctrine.ulid_generator" class="Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator">
|
||||
<argument type="service" id="ulid.factory" on-invalid="ignore" />
|
||||
<tag name="doctrine.id_generator" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.uuid_generator" class="Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator">
|
||||
<argument type="service" id="uuid.factory" on-invalid="ignore" />
|
||||
<tag name="doctrine.id_generator" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.command.entity_manager_provider" class="Doctrine\Bundle\DoctrineBundle\Orm\ManagerRegistryAwareEntityManagerProvider">
|
||||
<argument type="service" id="doctrine" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.entity_value_resolver" class="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver">
|
||||
<argument type="service" id="doctrine" />
|
||||
<argument type="service" id="doctrine.orm.entity_value_resolver.expression_language" on-invalid="ignore" />
|
||||
<tag name="Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver" priority="110">controller.argument_value_resolver</tag>
|
||||
</service>
|
||||
|
||||
<service id="doctrine.orm.entity_value_resolver.expression_language" class="Symfony\Component\ExpressionLanguage\ExpressionLanguage" />
|
||||
|
||||
<!-- commands -->
|
||||
<service id="doctrine.cache_clear_metadata_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-metadata" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.cache_clear_query_cache_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-query" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.cache_clear_result_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-result" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.cache_collection_region_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\CollectionRegionCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-collection-region" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.mapping_convert_command" class="Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:mapping:convert" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.schema_create_command" class="Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:schema:create" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.schema_drop_command" class="Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:schema:drop" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.ensure_production_settings_command" class="Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:ensure-production-settings" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.clear_entity_region_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\EntityRegionCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-entity-region" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.mapping_info_command" class="Doctrine\ORM\Tools\Console\Command\InfoCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:mapping:info" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.clear_query_region_command" class="Doctrine\ORM\Tools\Console\Command\ClearCache\QueryRegionCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:cache:clear-query-region" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.query_dql_command" class="Doctrine\ORM\Tools\Console\Command\RunDqlCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:query:dql" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.schema_update_command" class="Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:schema:update" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.schema_validate_command" class="Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand">
|
||||
<argument type="service" id="doctrine.orm.command.entity_manager_provider" />
|
||||
<tag name="console.command" command="doctrine:schema:validate" />
|
||||
</service>
|
||||
|
||||
<service id="doctrine.mapping_import_command" class="Doctrine\Bundle\DoctrineBundle\Command\ImportMappingDoctrineCommand">
|
||||
<argument type="service" id="doctrine" />
|
||||
<argument>%kernel.bundles%</argument>
|
||||
|
||||
<tag name="console.command" command="doctrine:mapping:import" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<xsd:schema xmlns="http://symfony.com/schema/dic/doctrine"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://symfony.com/schema/dic/doctrine"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xsd:element name="config">
|
||||
<xsd:complexType>
|
||||
<xsd:all>
|
||||
<xsd:element name="dbal" type="dbal" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="orm" type="orm" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="named_scalar">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- DBAL configuration -->
|
||||
|
||||
<xsd:attributeGroup name="connection-config">
|
||||
<xsd:attribute name="driver" type="xsd:string" />
|
||||
<xsd:attribute name="driver-class" type="xsd:string" />
|
||||
<xsd:attribute name="wrapper-class" type="xsd:string" />
|
||||
<xsd:attribute name="keep-slave" type="xsd:string" />
|
||||
<xsd:attribute name="keep-replica" type="xsd:string" />
|
||||
<xsd:attribute name="platform-service" type="xsd:string" />
|
||||
<xsd:attribute name="auto-commit" type="xsd:string" />
|
||||
<xsd:attribute name="schema-filter" type="xsd:string" />
|
||||
<xsd:attribute name="logging" type="xsd:string" default="false" />
|
||||
<xsd:attribute name="profiling" type="xsd:string" default="false" />
|
||||
<xsd:attribute name="profiling-collect-backtrace" type="xsd:string" default="false" />
|
||||
<xsd:attribute name="profiling-collect-schema-errors" type="xsd:string" default="true" />
|
||||
<xsd:attribute name="server-version" type="xsd:string" />
|
||||
<xsd:attribute name="schema-manager-factory" type="xsd:string" />
|
||||
<xsd:attribute name="result-cache" type="xsd:string" />
|
||||
<xsd:attribute name="use-savepoints" type="xsd:boolean" />
|
||||
<xsd:attribute name="disable-type-comments" type="xsd:boolean" />
|
||||
<xsd:attributeGroup ref="driver-config" />
|
||||
</xsd:attributeGroup>
|
||||
|
||||
<xsd:attributeGroup name="driver-config">
|
||||
<xsd:attribute name="url" type="xsd:string" />
|
||||
<xsd:attribute name="dbname" type="xsd:string" />
|
||||
<xsd:attribute name="host" type="xsd:string" />
|
||||
<xsd:attribute name="port" type="xsd:string" />
|
||||
<xsd:attribute name="user" type="xsd:string" />
|
||||
<xsd:attribute name="password" type="xsd:string" />
|
||||
<xsd:attribute name="override-url" type="xsd:boolean" />
|
||||
<xsd:attribute name="dbname-suffix" type="xsd:string" />
|
||||
<xsd:attribute name="application-name" type="xsd:string" />
|
||||
<xsd:attribute name="path" type="xsd:string" />
|
||||
<xsd:attribute name="unix-socket" type="xsd:string" />
|
||||
<xsd:attribute name="memory" type="xsd:string" />
|
||||
<xsd:attribute name="charset" type="xsd:string" />
|
||||
<xsd:attribute name="persistent" type="xsd:string" />
|
||||
<xsd:attribute name="protocol" type="xsd:string" />
|
||||
<xsd:attribute name="server" type="xsd:string" />
|
||||
<xsd:attribute name="service" type="xsd:string" />
|
||||
<xsd:attribute name="servicename" type="xsd:string" />
|
||||
<xsd:attribute name="session-mode" type="xsd:string" />
|
||||
<xsd:attribute name="default_dbname" type="xsd:string" />
|
||||
<xsd:attribute name="sslmode" type="xsd:string" />
|
||||
<xsd:attribute name="sslrootcert" type="xsd:string" />
|
||||
<xsd:attribute name="sslcert" type="xsd:string" />
|
||||
<xsd:attribute name="sslkey" type="xsd:string" />
|
||||
<xsd:attribute name="sslcrl" type="xsd:string" />
|
||||
<xsd:attribute name="pooled" type="xsd:string" />
|
||||
<xsd:attribute name="multiple-active-result-sets" type="xsd:string" />
|
||||
<xsd:attribute name="connectstring" type="xsd:string" />
|
||||
<xsd:attribute name="instancename" type="xsd:string" />
|
||||
</xsd:attributeGroup>
|
||||
|
||||
<xsd:group name="connection-child-config">
|
||||
<xsd:choice>
|
||||
<xsd:element name="option" type="option" />
|
||||
<xsd:element name="mapping-type" type="named_scalar" />
|
||||
<xsd:element name="slave" type="replica" />
|
||||
<xsd:element name="replica" type="replica" />
|
||||
<xsd:element name="default-table-option" type="named_scalar" />
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:complexType name="dbal">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="connection" type="connection" />
|
||||
<xsd:element name="type" type="named_scalar" />
|
||||
<xsd:element name="driver-scheme" type="driver_scheme" />
|
||||
<xsd:group ref="connection-child-config" />
|
||||
</xsd:choice>
|
||||
|
||||
<xsd:attribute name="default-connection" type="xsd:string" />
|
||||
<xsd:attributeGroup ref="connection-config" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="driver_scheme">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="scheme" type="xsd:string" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="option">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="xsd:anyType">
|
||||
<xsd:attribute name="key" type="xsd:string" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="connection">
|
||||
<xsd:group ref="connection-child-config" minOccurs="0" maxOccurs="unbounded" />
|
||||
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attributeGroup ref="connection-config" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="replica">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attributeGroup ref="driver-config" />
|
||||
</xsd:complexType>
|
||||
|
||||
<!-- ORM configuration -->
|
||||
|
||||
<xsd:complexType name="mapping">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="dir" type="xsd:string" />
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="prefix" type="xsd:string" />
|
||||
<xsd:attribute name="is-bundle" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="orm">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="entity-manager" type="entity_manager" />
|
||||
<xsd:element name="resolve-target-entity" type="resolve_target_entity" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:group ref="entity-manager-child-config" />
|
||||
</xsd:choice>
|
||||
|
||||
<xsd:attribute name="default-entity-manager" type="xsd:string" />
|
||||
<xsd:attribute name="proxy-dir" type="xsd:string" />
|
||||
<xsd:attribute name="proxy-namespace" type="xsd:string" />
|
||||
<xsd:attribute name="auto-generate-proxy-classes" type="xsd:string" default="false" />
|
||||
<xsd:attribute name="enable-lazy-ghost-objects" type="xsd:boolean" />
|
||||
<xsd:attributeGroup ref="entity-manager-config" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="resolve_target_entity">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="interface" type="xsd:string" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="cache_driver_type">
|
||||
<xsd:restriction base="xsd:token">
|
||||
<xsd:enumeration value="pool"/>
|
||||
<xsd:enumeration value="service"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:complexType name="cache_driver">
|
||||
<xsd:attribute name="type" type="cache_driver_type" default="pool" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="pool" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="entity_listeners">
|
||||
<xsd:choice minOccurs="1">
|
||||
<xsd:element name="entity" type="entity_listeners_entity" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="entity_listeners_entity">
|
||||
<xsd:choice minOccurs="1">
|
||||
<xsd:element name="listener" type="entity_listeners_listener" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="entity_listeners_listener">
|
||||
<xsd:choice minOccurs="1">
|
||||
<xsd:element name="event" type="entity_listeners_event" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="entity_listeners_event">
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="method" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="entity_manager">
|
||||
<xsd:group ref="entity-manager-child-config" minOccurs="0" maxOccurs="unbounded" />
|
||||
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attributeGroup ref="entity-manager-config" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:group name="entity-manager-child-config">
|
||||
<xsd:choice>
|
||||
<xsd:element name="mapping" type="mapping" />
|
||||
<xsd:element name="metadata-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="result-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="query-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="dql" type="dql" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="hydrator" type="named_scalar" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="filter" type="filter" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="entity-listeners" type="entity_listeners" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="second-level-cache" type="second-level-cache" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="schema-ignore-class" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:attributeGroup name="entity-manager-config">
|
||||
<xsd:attribute name="auto-mapping" type="xsd:string" />
|
||||
<xsd:attribute name="connection" type="xsd:string" />
|
||||
<xsd:attribute name="default-repository-class" type="xsd:string" />
|
||||
<xsd:attribute name="class-metadata-factory-name" type="xsd:string" />
|
||||
<xsd:attribute name="naming-strategy" type="xsd:string" />
|
||||
<xsd:attribute name="quote-strategy" type="xsd:string" />
|
||||
<xsd:attribute name="entity-listener-resolver" type="xsd:string" />
|
||||
<xsd:attribute name="repository-factory" type="xsd:string" />
|
||||
<xsd:attribute name="report-fields-where-declared" type="xsd:boolean" />
|
||||
<xsd:attribute name="validate-xml-mapping" type="xsd:boolean" />
|
||||
</xsd:attributeGroup>
|
||||
|
||||
<xsd:complexType name="filter" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="parameter" type="named_scalar" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
<xsd:attribute name="enabled" type="xsd:boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="second-level-cache-region" mixed="true">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="service" type="xsd:string" />
|
||||
<xsd:attribute name="lifetime" type="xsd:integer" />
|
||||
<xsd:attribute name="lock-lifetime" type="xsd:integer" />
|
||||
<xsd:attribute name="cache-driver" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="second-level-cache-logger" mixed="true">
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="service" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="second-level-cache" mixed="true">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="logger" type="second-level-cache-logger" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="region" type="second-level-cache-region" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="region-cache-driver" type="cache_driver" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="enabled" type="xsd:boolean" default="true"/>
|
||||
<xsd:attribute name="log-enabled" type="xsd:boolean" default="true"/>
|
||||
<xsd:attribute name="factory" type="xsd:string" />
|
||||
<xsd:attribute name="query-validator" type="xsd:string" />
|
||||
<xsd:attribute name="region-lifetime" type="xsd:integer" />
|
||||
<xsd:attribute name="region-lock-lifetime" type="xsd:integer" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="dql">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="string-function" type="named_scalar" />
|
||||
<xsd:element name="numeric-function" type="named_scalar" />
|
||||
<xsd:element name="datetime-function" type="named_scalar" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" data-icon-name="icon-tabler-database" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<ellipse cx="12" cy="6" rx="8" ry="3"></ellipse>
|
||||
<path d="M4 6v6a8 3 0 0 0 16 0v-6"></path>
|
||||
<path d="M4 12v6a8 3 0 0 0 16 0v-6"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1,533 @@
|
||||
{% extends request.isXmlHttpRequest ? '@WebProfiler/Profiler/ajax_layout.html.twig' : '@WebProfiler/Profiler/layout.html.twig' %}
|
||||
|
||||
{% import _self as helper %}
|
||||
|
||||
{% block toolbar %}
|
||||
{% if collector.querycount > 0 or collector.invalidEntityCount > 0 %}
|
||||
|
||||
{% set icon %}
|
||||
{% set status = collector.invalidEntityCount > 0 ? 'red' : collector.querycount > 50 ? 'yellow' %}
|
||||
|
||||
{% if profiler_markup_version >= 3 %}
|
||||
{{ include('@Doctrine/Collector/database.svg') }}
|
||||
{% else %}
|
||||
<span class="icon">{{ include('@Doctrine/Collector/icon.svg') }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if collector.querycount == 0 and collector.invalidEntityCount > 0 %}
|
||||
<span class="sf-toolbar-value">{{ collector.invalidEntityCount }}</span>
|
||||
<span class="sf-toolbar-label">errors</span>
|
||||
{% else %}
|
||||
<span class="sf-toolbar-value">{{ collector.querycount }}</span>
|
||||
<span class="sf-toolbar-info-piece-additional-detail">
|
||||
<span class="sf-toolbar-label">in</span>
|
||||
<span class="sf-toolbar-value">{{ '%0.2f'|format(collector.time * 1000) }}</span>
|
||||
<span class="sf-toolbar-label">ms</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% set text %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Database Queries</b>
|
||||
<span class="sf-toolbar-status {{ collector.querycount > 50 ? 'sf-toolbar-status-yellow' : '' }}">{{ collector.querycount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Different statements</b>
|
||||
<span class="sf-toolbar-status">{{ collector.groupedQueryCount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Query time</b>
|
||||
<span>{{ '%0.2f'|format(collector.time * 1000) }} ms</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Invalid entities</b>
|
||||
<span class="sf-toolbar-status {{ collector.invalidEntityCount > 0 ? 'sf-toolbar-status-red' : '' }}">{{ collector.invalidEntityCount }}</span>
|
||||
</div>
|
||||
{% if collector.cacheEnabled %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Cache hits</b>
|
||||
<span class="sf-toolbar-status sf-toolbar-status-green">{{ collector.cacheHitsCount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Cache misses</b>
|
||||
<span class="sf-toolbar-status {{ collector.cacheMissesCount > 0 ? 'sf-toolbar-status-yellow' : '' }}">{{ collector.cacheMissesCount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Cache puts</b>
|
||||
<span class="sf-toolbar-status {{ collector.cachePutsCount > 0 ? 'sf-toolbar-status-yellow' : '' }}">{{ collector.cachePutsCount }}</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Second Level Cache</b>
|
||||
<span class="sf-toolbar-status">disabled</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }}
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
<span class="label {{ collector.invalidEntityCount > 0 ? 'label-status-error' }} {{ collector.querycount == 0 ? 'disabled' }}">
|
||||
<span class="icon">{{ include('@Doctrine/Collector/' ~ (profiler_markup_version < 3 ? 'icon' : 'database') ~ '.svg') }}</span>
|
||||
<strong>Doctrine</strong>
|
||||
{% if collector.invalidEntityCount %}
|
||||
<span class="count">
|
||||
<span>{{ collector.invalidEntityCount }}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
{% if 'explain' == page %}
|
||||
{{ render(controller('Doctrine\\Bundle\\DoctrineBundle\\Controller\\ProfilerController::explainAction', {
|
||||
token: token,
|
||||
panel: 'db',
|
||||
connectionName: request.query.get('connection'),
|
||||
query: request.query.get('query')
|
||||
})) }}
|
||||
{% else %}
|
||||
{{ block('queries') }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block queries %}
|
||||
<style>
|
||||
.time-container { position: relative; }
|
||||
.time-container .nowrap { position: relative; z-index: 1; text-shadow: 0 0 2px #fff; }
|
||||
.time-bar { display: block; position: absolute; top: 0; left: 0; bottom: 0; background: #e0e0e0; }
|
||||
.sql-runnable.sf-toggle-content.sf-toggle-visible { display: flex; flex-direction: column; }
|
||||
.sql-runnable button { align-self: end; }
|
||||
{% if profiler_markup_version >= 3 %}
|
||||
.highlight .keyword { color: var(--highlight-keyword); font-weight: bold; }
|
||||
.highlight .word { color: var(--color-text); }
|
||||
.highlight .variable { color: var(--highlight-variable); }
|
||||
.highlight .symbol { color: var(--color-text); }
|
||||
.highlight .comment { color: var(--highlight-comment); }
|
||||
.highlight .string { color: var(--highlight-string); }
|
||||
.highlight .number { color: var(--highlight-constant); font-weight: bold; }
|
||||
.highlight .error { color: var(--highlight-error); }
|
||||
{% endif %}
|
||||
</style>
|
||||
|
||||
<h2>Query Metrics</h2>
|
||||
|
||||
<div class="metrics">
|
||||
<div class="metric-group">
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.querycount }}</span>
|
||||
<span class="label">Database Queries</span>
|
||||
</div>
|
||||
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.groupedQueryCount }}</span>
|
||||
<span class="label">Different statements</span>
|
||||
</div>
|
||||
|
||||
<div class="metric">
|
||||
<span class="value">{{ '%0.2f'|format(collector.time * 1000) }} ms</span>
|
||||
<span class="label">Query time</span>
|
||||
</div>
|
||||
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.invalidEntityCount }}</span>
|
||||
<span class="label">Invalid entities</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if collector.cacheEnabled %}
|
||||
<div class="metric-group">
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cacheHitsCount }}</span>
|
||||
<span class="label">Cache hits</span>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cacheMissesCount }}</span>
|
||||
<span class="label">Cache misses</span>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cachePutsCount }}</span>
|
||||
<span class="label">Cache puts</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="sf-tabs" style="margin-top: 20px;">
|
||||
<div class="tab {{ collector.queries is empty ? 'disabled' }}">
|
||||
{% set group_queries = request.query.getBoolean('group') %}
|
||||
<h3 class="tab-title">
|
||||
{% if group_queries %}
|
||||
Grouped Statements
|
||||
{% else %}
|
||||
Queries
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
{% if not collector.queries %}
|
||||
<div class="empty">
|
||||
<p>No executed queries.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if group_queries %}
|
||||
<p><a href="{{ path('_profiler', { panel: 'db', token: token }) }}">Show all queries</a></p>
|
||||
{% else %}
|
||||
<p><a href="{{ path('_profiler', { panel: 'db', token: token, group: true }) }}">Group similar statements</a></p>
|
||||
{% endif %}
|
||||
|
||||
{% for connection, queries in collector.queries %}
|
||||
{% if collector.connections|length > 1 %}
|
||||
<h3>{{ connection }} <small>connection</small></h3>
|
||||
{% endif %}
|
||||
|
||||
{% if queries is empty %}
|
||||
<div class="empty">
|
||||
<p>No database queries were performed.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if group_queries %}
|
||||
{% set queries = collector.groupedQueries[connection] %}
|
||||
{% endif %}
|
||||
<table class="alt queries-table">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if group_queries %}
|
||||
<th class="nowrap" onclick="javascript:sortTable(this, 0, 'queries-{{ loop.index }}')" data-sort-direction="1" style="cursor: pointer;">Time<span class="text-muted">▼</span></th>
|
||||
<th class="nowrap" onclick="javascript:sortTable(this, 1, 'queries-{{ loop.index }}')" style="cursor: pointer;">Count<span></span></th>
|
||||
{% else %}
|
||||
<th class="nowrap" onclick="javascript:sortTable(this, 0, 'queries-{{ loop.index }}')" data-sort-direction="-1" style="cursor: pointer;">#<span class="text-muted">▲</span></th>
|
||||
<th class="nowrap" onclick="javascript:sortTable(this, 1, 'queries-{{ loop.index }}')" style="cursor: pointer;">Time<span></span></th>
|
||||
{% endif %}
|
||||
<th style="width: 100%;">Info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="queries-{{ loop.index }}">
|
||||
{% for i, query in queries %}
|
||||
{% set i = group_queries ? query.index : i %}
|
||||
<tr id="queryNo-{{ i }}-{{ loop.parent.loop.index }}">
|
||||
{% if group_queries %}
|
||||
<td class="time-container">
|
||||
<span class="time-bar" style="width:{{ '%0.2f'|format(query.executionPercent) }}%"></span>
|
||||
<span class="nowrap">{{ '%0.2f'|format(query.executionMS * 1000) }} ms<br />({{ '%0.2f'|format(query.executionPercent) }}%)</span>
|
||||
</td>
|
||||
<td class="nowrap">{{ query.count }}</td>
|
||||
{% else %}
|
||||
<td class="nowrap">{{ loop.index }}</td>
|
||||
<td class="nowrap">{{ '%0.2f'|format(query.executionMS * 1000) }} ms</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ query.sql|doctrine_prettify_sql }}
|
||||
|
||||
<div>
|
||||
<strong class="font-normal text-small">Parameters</strong>: {{ profiler_dump(query.params, 2) }}
|
||||
</div>
|
||||
|
||||
<div class="text-small font-normal">
|
||||
<a href="#" class="sf-toggle link-inverse" data-toggle-selector="#formatted-query-{{ i }}-{{ loop.parent.loop.index }}" data-toggle-alt-content="Hide formatted query">View formatted query</a>
|
||||
|
||||
{% if query.runnable %}
|
||||
|
||||
<a href="#" class="sf-toggle link-inverse" data-toggle-selector="#original-query-{{ i }}-{{ loop.parent.loop.index }}" data-toggle-alt-content="Hide runnable query">View runnable query</a>
|
||||
{% endif %}
|
||||
|
||||
{% if query.explainable %}
|
||||
|
||||
<a class="link-inverse" href="{{ path('_profiler', { panel: 'db', token: token, page: 'explain', connection: connection, query: i }) }}" onclick="return explain(this);" data-target-id="explain-{{ i }}-{{ loop.parent.loop.index }}">Explain query</a>
|
||||
{% endif %}
|
||||
|
||||
{% if query.backtrace is defined %}
|
||||
|
||||
<a href="#" class="sf-toggle link-inverse" data-toggle-selector="#backtrace-{{ i }}-{{ loop.parent.loop.index }}" data-toggle-alt-content="Hide query backtrace">View query backtrace</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="formatted-query-{{ i }}-{{ loop.parent.loop.index }}" class="sql-runnable hidden">
|
||||
{{ query.sql|doctrine_format_sql(highlight = true) }}
|
||||
<button class="btn btn-sm hidden" data-clipboard-text="{{ query.sql|doctrine_format_sql(highlight = false)|e('html_attr') }}">Copy</button>
|
||||
</div>
|
||||
|
||||
{% if query.runnable %}
|
||||
<div id="original-query-{{ i }}-{{ loop.parent.loop.index }}" class="sql-runnable hidden">
|
||||
{% set runnable_sql = (query.sql ~ ';')|doctrine_replace_query_parameters(query.params) %}
|
||||
{{ runnable_sql|doctrine_prettify_sql }}
|
||||
<button class="btn btn-sm hidden" data-clipboard-text="{{ runnable_sql|e('html_attr') }}">Copy</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if query.explainable %}
|
||||
<div id="explain-{{ i }}-{{ loop.parent.loop.index }}" class="sql-explain"></div>
|
||||
{% endif %}
|
||||
|
||||
{% if query.backtrace is defined %}
|
||||
<div id="backtrace-{{ i }}-{{ loop.parent.loop.index }}" class="hidden">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">File/Call</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for trace in query.backtrace %}
|
||||
<tr>
|
||||
<td>{{ loop.index }}</td>
|
||||
<td>
|
||||
<span class="text-small">
|
||||
{% set line_number = trace.line|default(1) %}
|
||||
{% if trace.file is defined %}
|
||||
<a href="{{ trace.file|file_link(line_number) }}">
|
||||
{% endif %}
|
||||
{{- trace.class|default ~ (trace.class is defined ? trace.type|default('::')) -}}
|
||||
<span class="status-warning">{{ trace.function }}</span>
|
||||
{% if trace.file is defined %}
|
||||
</a>
|
||||
{% endif %}
|
||||
(line {{ line_number }})
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab {{ collector.connections is empty ? 'disabled' }}">
|
||||
<h3 class="tab-title">Database Connections</h3>
|
||||
<div class="tab-content">
|
||||
{% if not collector.connections %}
|
||||
<div class="empty">
|
||||
<p>There are no configured database connections.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ helper.render_simple_table('Name', 'Service', collector.connections) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab {{ collector.managers is empty ? 'disabled' }}">
|
||||
<h3 class="tab-title">Entity Managers</h3>
|
||||
<div class="tab-content">
|
||||
|
||||
{% if not collector.managers %}
|
||||
<div class="empty">
|
||||
<p>There are no configured entity managers.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ helper.render_simple_table('Name', 'Service', collector.managers) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab {{ not collector.cacheEnabled ? 'disabled' }}">
|
||||
<h3 class="tab-title">Second Level Cache</h3>
|
||||
<div class="tab-content">
|
||||
|
||||
{% if not collector.cacheEnabled %}
|
||||
<div class="empty">
|
||||
<p>Second Level Cache is not enabled.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if not collector.cacheCounts %}
|
||||
<div class="empty">
|
||||
<p>Second level cache information is not available.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="metrics">
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cacheCounts.hits }}</span>
|
||||
<span class="label">Hits</span>
|
||||
</div>
|
||||
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cacheCounts.misses }}</span>
|
||||
<span class="label">Misses</span>
|
||||
</div>
|
||||
|
||||
<div class="metric">
|
||||
<span class="value">{{ collector.cacheCounts.puts }}</span>
|
||||
<span class="label">Puts</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if collector.cacheRegions.hits %}
|
||||
<h3>Number of cache hits</h3>
|
||||
{{ helper.render_simple_table('Region', 'Hits', collector.cacheRegions.hits) }}
|
||||
{% endif %}
|
||||
|
||||
{% if collector.cacheRegions.misses %}
|
||||
<h3>Number of cache misses</h3>
|
||||
{{ helper.render_simple_table('Region', 'Misses', collector.cacheRegions.misses) }}
|
||||
{% endif %}
|
||||
|
||||
{% if collector.cacheRegions.puts %}
|
||||
<h3>Number of cache puts</h3>
|
||||
{{ helper.render_simple_table('Region', 'Puts', collector.cacheRegions.puts) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab {{ not collector.entities ? 'disabled' }}">
|
||||
<h3 class="tab-title">Entities Mapping</h3>
|
||||
<div class="tab-content">
|
||||
|
||||
{% if not collector.entities %}
|
||||
<div class="empty">
|
||||
<p>No mapped entities.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% for manager, classes in collector.entities %}
|
||||
{% if collector.managers|length > 1 %}
|
||||
<h3>{{ manager }} <small>entity manager</small></h3>
|
||||
{% endif %}
|
||||
|
||||
{% if classes is empty %}
|
||||
<div class="empty">
|
||||
<p>No loaded entities.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Class</th>
|
||||
<th scope="col">Mapping errors</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for class in classes %}
|
||||
{% set contains_errors = collector.mappingErrors[manager] is defined and collector.mappingErrors[manager][class.class] is defined %}
|
||||
<tr class="{{ contains_errors ? 'status-error' }}">
|
||||
<td>
|
||||
<a href="{{ class.file|file_link(class.line) }}">{{ class. class}}</a>
|
||||
</td>
|
||||
<td class="font-normal">
|
||||
{% if contains_errors %}
|
||||
<ul>
|
||||
{% for error in collector.mappingErrors[manager][class.class] %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
No errors.
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function explain(link) {
|
||||
"use strict";
|
||||
|
||||
var targetId = link.getAttribute('data-target-id');
|
||||
var targetElement = document.getElementById(targetId);
|
||||
|
||||
if (targetElement.style.display != 'block') {
|
||||
if (targetElement.getAttribute('data-sfurl') !== link.href) {
|
||||
fetch(link.href, {
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'}
|
||||
}).then(async function (response) {
|
||||
targetElement.innerHTML = await response.text()
|
||||
targetElement.setAttribute('data-sfurl', link.href)
|
||||
}, function () {
|
||||
targetElement.innerHTML = 'An error occurred while loading the query explanation.';
|
||||
})
|
||||
}
|
||||
|
||||
targetElement.style.display = 'block';
|
||||
link.innerHTML = 'Hide query explanation';
|
||||
} else {
|
||||
targetElement.style.display = 'none';
|
||||
link.innerHTML = 'Explain query';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sortTable(header, column, targetId) {
|
||||
"use strict";
|
||||
|
||||
var direction = parseInt(header.getAttribute('data-sort-direction')) || 1,
|
||||
items = [],
|
||||
target = document.getElementById(targetId),
|
||||
rows = target.children,
|
||||
headers = header.parentElement.children,
|
||||
i;
|
||||
|
||||
for (i = 0; i < rows.length; ++i) {
|
||||
items.push(rows[i]);
|
||||
}
|
||||
|
||||
for (i = 0; i < headers.length; ++i) {
|
||||
headers[i].removeAttribute('data-sort-direction');
|
||||
if (headers[i].children.length > 0) {
|
||||
headers[i].children[0].innerHTML = '';
|
||||
}
|
||||
}
|
||||
|
||||
header.setAttribute('data-sort-direction', (-1*direction).toString());
|
||||
header.children[0].innerHTML = direction > 0 ? '<span class="text-muted">▲</span>' : '<span class="text-muted">▼</span>';
|
||||
|
||||
items.sort(function(a, b) {
|
||||
return direction * (parseFloat(a.children[column].innerHTML) - parseFloat(b.children[column].innerHTML));
|
||||
});
|
||||
|
||||
for (i = 0; i < items.length; ++i) {
|
||||
target.appendChild(items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (navigator.clipboard) {
|
||||
document.querySelectorAll('[data-clipboard-text]').forEach(function(button) {
|
||||
button.classList.remove('hidden');
|
||||
button.addEventListener('click', function() {
|
||||
navigator.clipboard.writeText(button.getAttribute('data-clipboard-text'));
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//]]></script>
|
||||
{% endblock %}
|
||||
|
||||
{% macro render_simple_table(label1, label2, data) %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="key">{{ label1 }}</th>
|
||||
<th scope="col">{{ label2 }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for key, value in data %}
|
||||
<tr>
|
||||
<th scope="row">{{ key }}</th>
|
||||
<td>{{ value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,28 @@
|
||||
{% if data[0]|length > 1 %}
|
||||
{# The platform returns a table for the explanation (e.g. MySQL), display all columns #}
|
||||
<table style="margin: 5px 0;">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for label in data[0]|keys %}
|
||||
<th>{{ label }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in data %}
|
||||
<tr>
|
||||
{% for key, item in row %}
|
||||
<td>{{ item|replace({',': ', '}) }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
{# The Platform returns a single column for a textual explanation (e.g. PostgreSQL), display all lines #}
|
||||
<pre style="margin: 5px 0;">
|
||||
{%- for row in data -%}
|
||||
{{ row|first }}{{ "\n" }}
|
||||
{%- endfor -%}
|
||||
</pre>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
||||
<path fill="#AAAAAA" d="M5,8h14c1.7,0,3-1.3,3-3s-1.3-3-3-3H5C3.3,2,2,3.3,2,5S3.3,8,5,8z M18,3.6c0.8,0,1.5,0.7,1.5,1.5S18.8,6.6,18,6.6s-1.5-0.7-1.5-1.5S17.2,3.6,18,3.6z M19,9H5c-1.7,0-3,1.3-3,3s1.3,3,3,3h14c1.7,0,3-1.3,3-3S20.7,9,19,9z M18,13.6
|
||||
c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S18.8,13.6,18,13.6z M19,16H5c-1.7,0-3,1.3-3,3s1.3,3,3,3h14c1.7,0,3-1.3,3-3S20.7,16,19,16z M18,20.6c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S18.8,20.6,18,20.6z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 659 B |
Reference in New Issue
Block a user