src/Facade.php
public static function getProducer($appId = Producer::DEFAULT_APP_ID)
    {
        if (null === $appId) {
            $appId = Producer::DEFAULT_APP_ID;
        }

        if (!array_key_exists($appId, static::$producers)) {

            if (array_key_exists($appId, static::$builders)) {
                $func = static::$builders[$appId];
                static::addProducer($func($appId));
                unset(static::$builders[$appId]);

                return static::getProducer($appId);
            }

            throw new Exception\FacadeException("Producer with appId: '{$appId}' not exists yet!");
        }

        return static::$producers[$appId];
    }
public static function getProducer($appId = Producer::DEFAULT_APP_ID)
    {
        if (null === $appId) {
            $appId = Producer::DEFAULT_APP_ID;
        }

        if (!array_key_exists($appId, static::$producers)) {

            if (array_key_exists($appId, static::$builders)) {
                $func = static::$builders[$appId];
                static::addProducer($func($appId));
                unset(static::$builders[$appId]);

                return static::getProducer($appId);
            }

            throw new Exception\FacadeException("Producer with appId: '{$appId}' not exists yet!");
        }

        return static::$producers[$appId];
    }
public static function getProducer ( $ appId = Producer :: DEFAULT_APP_ID ) { if ( null === $ appId ) { $ appId = Producer :: DEFAULT_APP_ID ; } if ( ! array_key_exists ( $ appId , static :: $ producers ) ) { if ( array_key_exists ( $ appId , static :: $ builders ) ) { $ func = static :: $ builders [ $ appId ] ; static :: addProducer ( $ func ( $ appId ) ) ; unset ( static :: $ builders [ $ appId ] ) ; return static :: getProducer ( $ appId ) ; } throw new Exception \ FacadeException ( "Producer with appId: '{$appId}' not exists yet!" ) ; } return static :: $ producers [ $ appId ] ; }
Get producer by id

@param string $appId

@return Producer|null
@throws Exception\FacadeException
Get producer by id