Addon
8 years ago
Admin
8 years ago
Column
8 years ago
Helper
8 years ago
ListScreen
8 years ago
Meta
8 years ago
Notice
8 years ago
Settings
8 years ago
ThirdParty
8 years ago
API.php
8 years ago
Addon.php
8 years ago
Addons.php
8 years ago
Admin.php
8 years ago
Autoloader.php
8 years ago
Collection.php
8 years ago
Column.php
8 years ago
Groups.php
8 years ago
Helper.php
8 years ago
ListScreen.php
8 years ago
ListScreenPost.php
8 years ago
PluginInformation.php
8 years ago
TableScreen.php
8 years ago
View.php
8 years ago
ViewInterface.php
8 years ago
Helper.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * Class AC_Helper |
| 9 | * |
| 10 | * Implements __call to work around any keyword restrictions for PHP versions > 7 |
| 11 | * |
| 12 | * @property AC_Helper_Array array |
| 13 | * @property AC_Helper_Date date |
| 14 | * @property AC_Helper_Image image |
| 15 | * @property AC_Helper_Post post |
| 16 | * @property AC_Helper_String string |
| 17 | * @property AC_Helper_Taxonomy taxonomy |
| 18 | * @property AC_Helper_User user |
| 19 | * @property AC_Helper_Icon icon |
| 20 | * @property AC_Helper_Html html |
| 21 | * @property AC_Helper_Network network |
| 22 | * @property AC_Helper_File file |
| 23 | */ |
| 24 | final class AC_Helper { |
| 25 | |
| 26 | public function __get( $helper ) { |
| 27 | $class = 'AC_Helper_' . ucfirst( $helper ); |
| 28 | |
| 29 | if ( class_exists( 'AC_Helper_' . ucfirst( $helper ) ) ) { |
| 30 | return new $class; |
| 31 | } |
| 32 | |
| 33 | return false; |
| 34 | } |
| 35 | |
| 36 | } |
| 37 |