// source: https://blog.itsjavi.com/target-software-architectures-the-onion-architecture
/tests
/src
/Application
/UseCase
/CreateOrder
CreateOrderRequest
CreateOrderResponse
CreateOrderUseCase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends: | |
| - plugin:yml/standard | |
| rules: | |
| yml/block-mapping: | |
| - error | |
| - always | |
| yml/block-sequence: | |
| - error | |
| - always | |
| yml/quotes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################## | |
| # This is a KISS script to compare configuration changes caused by https://www.drupal.org/node/3230199 | |
| # Make sure https://github.com/homeport/dyff is installed before you use this. | |
| # License GPL-2.0-or-later. | |
| ############################################################################### | |
| #!/usr/bin/env bash | |
| echo "Enter the path of the original config directory, e.g.: /foo/bar/build/config" | |
| read -r old_config_dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types = 1); | |
| namespace Drupal\my_module_entity\Annotation; | |
| use Drupal\Core\Entity\Annotation\EntityType; | |
| use Drupal\Core\StringTranslation\TranslatableMarkup; | |
| use Drupal\my_module_entity\Entity\MyModuleEntityType as MyModuleEntityTypeClass; |
- Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
- EventCentric.Core - Event Sourcing and CQRS in PHP
- LiteCQRS - Small convention based CQRS library for PHP
- predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
- ProophEventSourcing - Provides basic functionality for event-sourced aggregates
- ProophEventStore - PHP 5.4+ EventStore Implementation
- ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $cnt = 10000000; | |
| interface FooInterface {} | |
| class BarClass implements FooInterface { | |
| } | |
| $x = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once "vendor/autoload.php"; | |
| use GuzzleHttp\Client; | |
| use GuzzleHttp\Promise; | |
| $endpoint = getenv('APIGEE_EDGE_ENDPOINT') ?: 'https://api.enterprise.apigee.com/v1'; | |
| $org = getenv('APIGEE_EDGE_ORGANIZATION'); | |
| $client = new Client(['base_uri' => "{$endpoint}/o/{$org}/", 'auth' => [getenv('APIGEE_EDGE_USER'), getenv('APIGEE_EDGE_PASSWORD')]]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once "vendor/autoload.php"; | |
| require_once "examples/authentication.inc"; | |
| $envCredProd = new EnvironmentCredentialProvider(); | |
| $auth = new \Apigee\Edge\HttpClient\Plugin\Authentication\Oauth($envCredProd->getUsername(), $envCredProd->getPassword(), new \Apigee\Edge\Tests\Test\HttpClient\Plugin\InMemoryOauthTokenStorage(), null, getenv('APIGEE_EDGE_PHP_SDK_CLIENT_ID') ?: null, getenv('APIGEE_EDGE_PHP_SDK_CLIENT_SECRET' ?: null), null, getenv('APIGEE_EDGE_PHP_SDK_AUTH_SERVER') ?: null); | |
| $client = new \Apigee\Edge\Client($auth); | |
| $envc = new \Apigee\Edge\Api\Management\Controller\EnvironmentController($envCredProd->getOrganization(), $client); | |
| try { |
<?php
$a = 1; $b = &$a; $b = 42; print $a;This is pretty simple, isn't it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Implements hook_default_search_api_server(). | |
| */ | |
| function MY_MODULE_default_search_api_server() { | |
| $items = []; | |
| $host = variable_get('solr_search_api_host', 'localhost'); | |
| $scheme = variable_get('solr_search_api_scheme', 'http'); |