| 1 |
<?php |
| 2 |
/** |
| 3 |
* Extension Factory |
| 4 |
* |
| 5 |
* @package NotificationX\Extensions |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace NotificationX\Core; |
| 9 |
|
| 10 |
use NotificationX\Admin\Settings; |
| 11 |
use NotificationX\GetInstance; |
| 12 |
|
| 13 |
/** |
| 14 |
* GetData Class |
| 15 |
*/ |
| 16 |
class GetData extends \ArrayObject { |
| 17 |
|
| 18 |
public function __get($name) { |
| 19 |
if ($this->offsetExists($name)) { |
| 20 |
return $this->offsetGet($name); |
| 21 |
} |
| 22 |
// Mirrors PHP's own undefined-property notice for this ArrayAccess wrapper; |
| 23 |
// dropping it would make a mistyped property silently read as null. |
| 24 |
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error |
| 25 |
trigger_error( esc_html( 'Undefined property: ' . $name ) ); |
| 26 |
} |
| 27 |
|
| 28 |
#[\ReturnTypeWillChange] |
| 29 |
public function offsetGet ($name){ |
| 30 |
if(parent::offsetExists($name)){ |
| 31 |
return parent::offsetGet($name); |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
} |
| 36 |
|