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 | |
| namespace App\Doctrine\EntityListener; | |
| use Doctrine\ORM\EntityManagerInterface; | |
| use Doctrine\ORM\Event\OnFlushEventArgs; | |
| use App\Entity\Post; | |
| class PostEntityListener { |
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 | |
| namespace App\Doctrine\EntityListener; | |
| use Doctrine\ORM\EntityManagerInterface; | |
| use Doctrine\ORM\Event\OnFlushEventArgs; | |
| use App\Entity\Post; | |
| class PostEntityListener { | |
| /** | |
| * @inheritDoc | |
| * @param OnFlushEventArgs $event |
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 | |
| namespace App\Doctrine\EntityListener; | |
| use Doctrine\ORM\EntityManagerInterface; | |
| use Doctrine\ORM\Event\OnFlushEventArgs; | |
| use App\Entity\Post; | |
| class PostEntityListener { | |
| /** | |
| * @inheritDoc | |
| * @param OnFlushEventArgs $event |
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 | |
| namespace App\Repository; | |
| use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |
| use Symfony\Bridge\Doctrine\RegistryInterface; | |
| use App\Repository\EntityStatsRepositoryInterface; | |
| class EntityStatsRepositoryDecorator extends ServiceEntityRepository { |
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 | |
| namespace App\Service; | |
| final class ShortcodeService { | |
| private $shortcodes = []; | |
| public function isShortcode($name) { | |
| return isset($this->shortcodes[$name]); | |
| } |
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 | |
| namespace App\Shortcode; | |
| interface ShortcodeInterface { | |
| function getName(): string; | |
| function getArgs(): array; | |
| public function apply(array $attrs, string $content): string; | |
| } |
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 | |
| namespace App\Shortcode; | |
| interface ShortcodeInterface { | |
| const SHORTCODE_TAG = 'lac.shortcode'; | |
| function getName(): string; | |
| function getArgs(): array; | |
| public function apply(array $attrs, string $content): string; | |
| } |
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 | |
| namespace App; | |
| use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; | |
| use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use Symfony\Component\HttpKernel\Kernel as BaseKernel; | |
| class ShortcodesPass extends BaseKernel implements CompilerPassInterface { | |
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 | |
| namespace App\Service; | |
| use Stripe\Stripe; | |
| use Stripe\Product; | |
| final class StripeCreateProduct { | |
| /** |