lib/Lime/App.php
public function service($name, $callable) {

        $this->registry[$name] = function($c) use($callable) {
            static $object;

            if (null === $object) {
                $object = $callable($c);
            }

            return $object;
        };

        return $this;
    }
public function service($name, $callable) {

        $this->registry[$name] = function($c) use($callable) {
            static $object;

            if (null === $object) {
                $object = $callable($c);
            }

            return $object;
        };

        return $this;
    }
public function service ( $ name , $ callable ) { $ this -> registry [ $ name ] = function ( $ c ) use ( $ callable ) { static $ object ; if ( null === $ object ) { $ object = $ callable ( $ c ) ; } return $ object ; } ; return $ this ; }
Returns a closure that stores the result of the given closure
@param  String  $name
@param  \Closure $callable
@return Object
Returns a closure that stores the result of the given closure