Ejemplo n.º 1
0
 /**
  * @param ShopgateBuilder $builder If empty, the default ShopgateBuilder will be instantiated.
  */
 public final function __construct(ShopgateBuilder $builder = null)
 {
     // some default values
     $this->splittedExport = false;
     $this->exportOffset = 0;
     $this->exportLimit = 1000;
     // fire the plugin's startup callback
     try {
         $this->startup();
     } catch (ShopgateLibraryException $e) {
         // logging is done in exception constructor
     }
     // build the object graph and get needed objects injected via set* methods
     if (empty($builder)) {
         $builder = new ShopgateBuilder($this->config);
     }
     $builder->buildLibraryFor($this);
     // store the builder
     $this->builder = $builder;
 }