Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added service provider interface #12783

Merged
merged 4 commits into from
Apr 11, 2017
Merged

Added service provider interface #12783

merged 4 commits into from
Apr 11, 2017

Conversation

sergeyklay
Copy link
Contributor

@sergeyklay sergeyklay commented Apr 11, 2017

namespace Acme;

use Phalcon\DiInterface;
use Phalcon\Breadcrumbs;
use Phalcon\Di\ServiceProviderInterface;

class SomeServiceProvider implements ServiceProviderInterface
{
    public function register(DiInterface $di)
    {
        $di->setShared('breadcrumbs', function () {
            $breadcrumbs = new Breadcrumbs();
            $breadcrumbs->setEventsManager($di->get('eventsManager'));
            $breadcrumbs->setSeparator('');

           return $breadcrumbs;
        });
    }
}

@sergeyklay sergeyklay merged commit 80b32ce into phalcon:3.2.x Apr 11, 2017
@sergeyklay sergeyklay deleted the feature/service-provider branch April 11, 2017 20:56
sergeyklay added a commit that referenced this pull request Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant