coduo / TuTu

Flexible HTTP server mocking tool in PHP. TuTu can work with built-in php server so everything that you need to use is php.
MIT License
58 stars 10 forks source link

Replaced pimple with custom ServiceContainer #8

Closed norberttech closed 10 years ago

norberttech commented 10 years ago

This PR breaks current extension compatibility but it's easy to fix it. I've created own ServiceContainer because there are few missing features in pimple and it seems that there is not third part ligthwate standalone service container anywhere. (maybe we can extract this one into separated repo?). Why didn't I just extend pimple? It was much easier this way :P

TuTu ServiceContainer have following methods:

public function hasParameter($id)
public function setParameter($id, $value)
public function getParameter($id)
public function hasService($id)
public function setDefinition($id, \Closure $definition, $tags = [])
public function setStaticDefinition($id, \Closure $definition, $tags = [])
public function getService($id)
public function removeService($id)
public function getServicesByTag($tag)

Did I miss something?