PluginProbe
Tamara Checkout / trunk
Tamara Checkout vtrunk
1.9.9.23 1.9.9.22 1.9.9.20 trunk 1.0.13 1.7.4 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 1.9.9.1 1.9.9.11 1.9.9.12 1.9.9.13 1.9.9.14 1.9.9.15 1.9.9.16 1.9.9.17 1.9.9.2 1.9.9.3 1.9.9.4 1.9.9.5 All 29 releases
tamara-checkout / src / Traits / ServiceTrait.php

ServiceTrait.php in Tamara Checkout trunk, at src/Traits/ServiceTrait.php

37 lines 657 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace Tamara\Wp\Plugin\Traits;
5
6 use Tamara\Wp\Plugin\Dependencies\Illuminate\Container\Container;
7
8 trait ServiceTrait
9 {
10 /**
11 * @var Container|null
12 */
13 protected $_container = null;
14
15 abstract public function init();
16
17 /**
18 * @param Container $container
19 *
20 * @noinspection PhpUnusedDeclarationInspection
21 */
22 public function setContainer(Container $container)
23 {
24 if (null === $this->_container) {
25 $this->_container = $container;
26 }
27 }
28
29 /**
30 * @return Container
31 */
32 public function getContainer(): Container
33 {
34 return $this->_container;
35 }
36 }
37