API
2 days ago
Admin
2 days ago
Blocks
2 days ago
CLI
2 days ago
Data
2 days ago
Integrations
2 days ago
REST
2 days ago
Theme
2 days ago
Tools
2 days ago
Whatsit
2 days ago
Config_Handler.php
2 days ago
Integration.php
2 days ago
Permissions.php
2 days ago
Pod_Manager.php
2 days ago
Service_Provider.php
2 days ago
Service_Provider_Base.php
2 days ago
Service_Provider_Fallback.php
2 days ago
Static_Cache.php
2 days ago
Whatsit.php
2 days ago
Wisdom_Tracker.php
2 days ago
Service_Provider.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Pods; |
| 4 | |
| 5 | use PodsMeta; |
| 6 | |
| 7 | /** |
| 8 | * Class Service_Provider |
| 9 | * |
| 10 | * @since 2.8.0 |
| 11 | */ |
| 12 | class Service_Provider extends \Pods\Service_Provider_Base { |
| 13 | |
| 14 | /** |
| 15 | * Registers the classes and functionality needed. |
| 16 | * |
| 17 | * @since 2.8.0 |
| 18 | */ |
| 19 | public function register() { |
| 20 | $this->container->singleton( Config_Handler::class, Config_Handler::class ); |
| 21 | $this->container->singleton( Permissions::class, Permissions::class ); |
| 22 | $this->container->singleton( Pod_Manager::class, Pod_Manager::class ); |
| 23 | $this->container->singleton( Static_Cache::class, Static_Cache::class ); |
| 24 | $this->container->singleton( Data\Map_Field_Values::class, Data\Map_Field_Values::class ); |
| 25 | $this->container->singleton( Theme\WP_Query_Integration::class, Theme\WP_Query_Integration::class ); |
| 26 | $this->container->singleton( Tools\Repair::class, Tools\Repair::class ); |
| 27 | $this->container->singleton( Tools\Reset::class, Tools\Reset::class ); |
| 28 | $this->container->singleton( PodsMeta::class, PodsMeta::class ); |
| 29 | |
| 30 | $this->hooks(); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Hooks all the methods and actions the class needs. |
| 35 | * |
| 36 | * @since 2.8.0 |
| 37 | */ |
| 38 | protected function hooks() { |
| 39 | add_action( 'init', $this->container->callback( Theme\WP_Query_Integration::class, 'hook' ), 20 ); |
| 40 | } |
| 41 | } |
| 42 |