/** * Creates a stuff with attributes * * @param $owner Charac The stuff owner * @param $name string Name of the stuff * @param $rarity integer Rarity of the stuff * @param $level integer Level of the stuff * @param $weight integer Weight of the stuff * @return Stuff The newly created stuff */ public static function withAttributes($owner, $name, $rarity, $level, $weight) { $instance = new self(); $instance->setOwner($owner); $instance->setName($name); $instance->setRarity($rarity); $instance->setLevel($level); $instance->setWeight($weight); return $instance; }