Ejemplo n.º 1
0
 public function equipCar()
 {
     $specs = SpecStorage::getCommonSpecifications();
     array_push($specs, SpecStorage::getSpecification(self::airCondType));
     array_push($specs, SpecStorage::getSpecification(self::airbagSlug, self::airBagNumber));
     $this->assignDefaultSpecs($specs);
 }
Ejemplo n.º 2
0
 public function equipCar()
 {
     $eClassDefSpecs = SpecStorage::getCommonSpecifications();
     array_push($eClassDefSpecs, SpecStorage::getSpecification(self::airCondType));
     array_push($eClassDefSpecs, SpecStorage::getSpecification(self::airbagSlug, self::airBagNumber));
     array_push($eClassDefSpecs, SpecStorage::getSpecification("cruise"));
     array_push($eClassDefSpecs, SpecStorage::getSpecification("parktronic"));
     array_push($eClassDefSpecs, SpecStorage::getSpecification("senzor-ploaie"));
     $this->assignDefaultSpecs($eClassDefSpecs);
 }
Ejemplo n.º 3
0
 public function equipCar()
 {
     $sClassDefSpecs = SpecStorage::getCommonSpecifications();
     array_push($sClassDefSpecs, SpecStorage::getSpecification(self::airCondType));
     array_push($sClassDefSpecs, SpecStorage::getSpecification(self::airbagSlug, self::airBagNumber));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("xenon"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("scauneRegl"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("senzor-lumina"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("senzor-ploaie"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("piele"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("parktronic"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("calculator"));
     array_push($sClassDefSpecs, SpecStorage::getSpecification("cruise"));
     $this->assignDefaultSpecs($sClassDefSpecs);
 }
Ejemplo n.º 4
0
 /**
  * Checks if an optional specification is assigned to the vehicle -> deletes it
  * @param type $specification
  */
 public function deleteSpec($specName)
 {
     $specificationExists = SpecStorage::getSpecification($specName);
     if (!isset($specificationExists)) {
         Helper::displayErrorMessage("There is no such specification: " . $specName);
     } else {
         $isEquipped = isset($this->optionalSpecs[$specName]);
         if ($isEquipped) {
             Helper::displayInfoMessage("DELETING optional specification: " . $this->optionalSpecs[$specName]->getNameSpec());
             $deletedSpec = $this->optionalSpecs[$specName]->getNameSpec();
             unset($this->optionalSpecs[$specName]);
             Helper::displaySuccessMessage("The specification (" . $deletedSpec . ") was successfully deleted");
         } else {
             Helper::displayErrorMessage("This car is not equipped with: " . $specificationExists->getNameSpec());
         }
     }
 }