PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.1.12
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.1.12
3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 All 123 releases
firebox / Inc / Framework / Inc / Base / Assignments.php

Assignments.php in FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment 3.1.12, at Inc/Framework/Inc/Base/Assignments.php

96 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package FirePlugins Framework
4 * @version 1.2.3
5 *
6 * @author FirePlugins <[email protected]>
7 * @link https://www.fireplugins.com
8 * @copyright Copyright © 2026 FirePlugins All Rights Reserved
9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 */
11
12 namespace FPFramework\Base;
13
14 if (!defined('ABSPATH'))
15 {
16 exit; // Exit if accessed directly.
17 }
18
19 // @deprecated - Use \FPFramework\Base\Conditions\ConditionsHelper;
20 class Assignments
21 {
22 /**
23 * Factory object
24 *
25 * @var \FPFramework\Base\Factory
26 */
27 protected $factory;
28
29 /**
30 * Assignments to Conditions map.
31 *
32 * @deprecated To be removed Early/Mid 2024
33 */
34 protected $typeAliases = [
35 'date' => 'Date\Date',
36 'time' => 'Date\Time',
37 'ip' => 'IP',
38 'url' => 'URL',
39 'timeonsite' => 'TimeOnSite',
40 'posts' => 'WP\Posts',
41 'pages' => 'WP\Pages',
42 'cpts' => 'WP\CustomPostTypes',
43 'tags' => 'WP\Tags',
44 'categories' => 'WP\Categories',
45 'device' => 'Device',
46 'browser' => 'Browser',
47 'os' => 'OS',
48 'city' => 'Geo\City',
49 'country' => 'Geo\Country',
50 'continent' => 'Geo\Continent',
51 'fbform' => 'FireBox\Form',
52 'menu' => 'WP\Menu',
53 'grouplevel' => 'WP\UserGroup',
54 'userid' => 'WP\UserID',
55 'pageviews' => 'Pageviews',
56 'onotherbox' => 'FireBox\Popup',
57 'language' => 'WP\Language',
58 'referrer' => 'Referrer',
59 'cookie' => 'Cookie',
60 'php' => 'PHP',
61 ];
62
63 /**
64 * Constructor
65 */
66 public function __construct($factory = null)
67 {
68 $this->factory = is_null($factory) ? new \FPFramework\Base\Factory() : $factory;
69 }
70
71 /**
72 * Returns the classname for a given assignment alias
73 *
74 * @param string $alias
75 * @return string|void
76 */
77 public function aliasToClassname($alias)
78 {
79 $alias = strtolower($alias);
80 foreach ($this->typeAliases as $aliases => $type)
81 {
82 if (strtolower($type) == $alias)
83 {
84 return $type;
85 }
86
87 $aliases = explode('|', strtolower($aliases));
88 if (in_array($alias, $aliases))
89 {
90 return $type;
91 }
92 }
93
94 return null;
95 }
96 }