コード例 #1
0
 /**
  * Returns a StockManager
  *
  * @return StockManagerInterface
  */
 public static function getManager()
 {
     if (!isset(StockManagerFactory::$stock_manager)) {
         $stock_manager = StockManagerFactory::execHookStockManagerFactory();
         if (!$stock_manager instanceof StockManagerInterface) {
             $stock_manager = new StockManager();
         }
         StockManagerFactory::$stock_manager = $stock_manager;
     }
     return StockManagerFactory::$stock_manager;
 }