/** * Setts an ordinary card with random values **/ public function setCard() { $cardAvailableConfigs = GlobalProp::getConfig(); foreach ($this->_prop as $value) { $randomKey = array_rand($cardAvailableConfigs[$value]); $this->{$value} = $cardAvailableConfigs[$value][$randomKey]; } return $this; }