function explode($input) { $this->input = $input; if (!$this->hasWildCards()) { return array($input); } $this->result = array(); $this->i = 0; $this->replaceAllWithWildcard(); $result = array(); $finder = new Elite_Vaf_Model_Vehicle_Finder($this->getSchema()); foreach ($finder->findByLevels($this->input) as $vehicle) { array_push($result, $vehicle->toTitleArray()); } return $result; }
/** * @param Elite_Vaf_Model_Abstract - if is an "aggregrate" of fits ( iterate and add it's children ) */ function doAddFit($entity) { $vehicleFinder = new Elite_Vaf_Model_Vehicle_Finder(new Elite_Vaf_Model_Schema()); $params = array($entity->getType() => $entity->getTitle()); $vehicles = $vehicleFinder->findByLevels($params); return $vehicles; }