Example #1
0
 public function runCustomers()
 {
     $builder = new CustomersBuilder();
     $customers = array();
     if ($this->update) {
         if ($this->uid) {
             $customers = $builder->buildCustomersUpdateById($this->uid);
         } elseif ($this->custom) {
             $customers = $builder->buildCustomersCustomUpdate();
         } elseif ($this->limit) {
             $customers = $builder->buildCustomersUpdate();
         } else {
             CommandHelper::updateNotice();
         }
         if (!empty($customers)) {
             $this->requestHelper->updateCustomers($customers);
         }
     } else {
         if ($this->uid) {
             $customers = $builder->buildCustomersById($this->uid);
         } elseif ($this->limit) {
             $customers = $builder->buildCustomersLast();
         } else {
             $customers = $builder->buildCustomers();
         }
         if (!empty($customers)) {
             $this->requestHelper->uploadCustomers($customers);
         }
     }
 }