• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IlyasDeckers / ody-core / 13589380408

28 Feb 2025 01:41PM UTC coverage: 13.422% (-19.7%) from 33.151%
13589380408

push

github

IlyasDeckers
add support classes/methods (wip)

0 of 2412 new or added lines in 16 files covered. (0.0%)

544 of 4053 relevant lines covered (13.42%)

4.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ServiceProvider/Services.php
1
<?php
2

3
namespace Ody\Core\ServiceProvider;
4

5
use Ody\Core\Kernel;
6

7
class Services
8
{
9
    /** @var Resolver */
10
    protected $resolver;
11

12
    /** @var ServiceProvider[] */
13
    private $providers = [];
14

15
    /** @var array */
16
    protected $options;
17

18
    /**
19
     * @param Resolver
20
     * @param array $options
21
     */
NEW
22
    public function __construct(Resolver $resolver, array $options = [])
×
23
    {
NEW
24
        $this->resolver = $resolver;
×
NEW
25
        $this->options = $options;
×
26
    }
27

28
    /**
29
     * Override this in subclasses to add your module's services
30
     *
31
     * This method will be called at the beginning of ComPHPPuebla\Slim\Services::configure
32
     */
NEW
33
    protected function init()
×
34
    {
NEW
35
    }
×
36

37
    /**
38
     * @param ServiceProvider $provider
39
     * @return Services
40
     */
NEW
41
    public function add(ServiceProvider $provider)
×
42
    {
NEW
43
        $this->providers[] = $provider;
×
44

NEW
45
        return $this;
×
46
    }
47

48
    /**
49
     * Configure the services for all your modules
50
     *
51
     * @param Slim $app
52
     */
NEW
53
    public function configure(Slim $app)
×
54
    {
NEW
55
        $this->init();
×
56

57
        /** @var ServiceProvider $provider */
NEW
58
        foreach ($this->providers as $provider) {
×
NEW
59
            $provider->configure($app, $this->resolver, $this->options);
×
60
        }
61
    }
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc