public static function hasWheel($userId) { $wheel = Wheel::model()->find('user_id=:userId', array(':userId' => $userId)); if ($wheel) { return true; } else { return false; } }
<?php require 'Wheel.php'; require 'Engine.php'; $wheel = new Wheel(); $engine = new Engine(); $engine->start(); $wheel->roll(); $wheel->drift(); $engine->stop();
public function display() { parent::display(); echo "Wysokosc to: " . $this->getH() . "<br>"; }
/** * @param Wheel $wheel * * @return mixed */ function visitWheel(Wheel $wheel) { echo "Kick my" + $wheel->getName() + "wheel" . PHP_EOL; }
<?php require 'Wheel.php'; require 'Engine.php'; $wheel = new Wheel(); $engine = new Engine(); $engine->start(); $wheel->roll();
public function copy() { $wheel = new Wheel(); $wheel->setSize($this->getSize()); return $wheel; }