Hi all, basically I have two classes Inventory and Character. During the construct of the inventory I am trying to determine the characters gender however this just doesn't seem to be working for me at all.. I haven't really used static functions before so if somebody could point out what I'm doing wrong it would be much appreciated..
File 1:
class Inventory
{
protected $user_gender;
public function __construct( $id = 0 )
{
$user_gender = Character::getGenderStatic();
}
}
File 2:
class Character
{
protected static $gender;
public static function getGenderStatic() {
return self::$gender;
}
}