public function getContainer()
    {
        $mutex = new Mutex($this->file . '.lock', true);

        $ret = $mutex->run(
            function () {
                if ($this->needsRecompile()) {
                    file_put_contents($this->file, $this->compileContainerCode());
                }
                return include $this->file;
            }
        );

        if (!($ret instanceof Container)) {
            throw new \LogicException("The container must be returned by the compiler");
        }
        foreach ($this->plugins as $plugin) {
            $ret->addPlugin($plugin);
        }
        return $ret;
    }
public function getContainer()
    {
        $mutex = new Mutex($this->file . '.lock', true);

        $ret = $mutex->run(
            function () {
                if ($this->needsRecompile()) {
                    file_put_contents($this->file, $this->compileContainerCode());
                }
                return include $this->file;
            }
        );

        if (!($ret instanceof Container)) {
            throw new \LogicException("The container must be returned by the compiler");
        }
        foreach ($this->plugins as $plugin) {
            $ret->addPlugin($plugin);
        }
        return $ret;
    }
public function getContainer ( ) { $ mutex = new Mutex ( $ this -> file . '.lock' , true ) ; $ ret = $ mutex -> run ( function ( ) { if ( $ this -> needsRecompile ( ) ) { file_put_contents ( $ this -> file , $ this -> compileContainerCode ( ) ) ; } return include $ this -> file ; } ) ; if ( ! ( $ ret instanceof Container ) ) { throw new \ LogicException ( "The container must be returned by the compiler" ) ; } foreach ( $ this -> plugins as $ plugin ) { $ ret -> addPlugin ( $ plugin ) ; } return $ ret ; }
Writes the code to a temporary file and returns the resulting Container object.

@return mixed

@throws \LogicException
Writes the code to a temporary file and returns the resulting Container object .