1: <?php
2:
3: namespace Charcoal\App;
4:
5: use Charcoal\App\App;
6:
7: /**
8: * Implementation, as trait, of the `AppAwareInterface`.
9: */
10: trait AppAwareTrait
11: {
12: /**
13: * @var App $app
14: */
15: private $app;
16:
17: /**
18: * @param App $app The app instance this object depends on.
19: * @return AppAwareInterface Chainable
20: */
21: public function setApp(App $app)
22: {
23: $this->app = $app;
24: return $this;
25: }
26:
27: /**
28: * @return App
29: */
30: protected function app()
31: {
32: return $this->app;
33: }
34: }
35: