/** @return Elite_Vafwheel_Model_BoltPattern_Single */
 function boltPattern()
 {
     $r = $this->query(sprintf("\n            SELECT lug_count, bolt_distance, offset\n            FROM elite_definition_wheel\n            WHERE leaf_id = %d\n            ", (int) $this->wrappedVehicle->getId()));
     return $r->fetchObject();
 }
Esempio n. 2
0
 function addPaintCode(VF_Vehicle $vehicle, Elite_Vafpaint_Model_Paint $paint)
 {
     $schema = VF_Singleton::getInstance()->schema();
     $sql = sprintf("\n            REPLACE INTO\n                `elite_mapping_paint`\n            ( `mapping_id`, `code`, `name`, `color` )\n                VALUES\n            ( %d, %s, %s, %s )\n            ", (int) $vehicle->getId(), $this->getReadAdapter()->quote($paint->getCode()), $this->getReadAdapter()->quote($paint->getName()), $this->getReadAdapter()->quote($paint->getColor()));
     $this->query($sql);
 }