Skip to content

Commit 84cf950

Browse files
committed
Fixes #167
1 parent 82ce833 commit 84cf950

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

lib/Tmdb/Model/Person.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ class Person extends AbstractModel implements PersonInterface
7979
*/
8080
private $profileImage;
8181

82+
/**
83+
* @var float
84+
*/
85+
private $popularity;
86+
8287
/**
8388
* @var Common\GenericCollection
8489
*/
@@ -121,6 +126,8 @@ class Person extends AbstractModel implements PersonInterface
121126
*/
122127
protected $taggedImages;
123128

129+
protected $gender = 0;
130+
124131
public static $properties = [
125132
'adult',
126133
'also_known_as',
@@ -132,6 +139,8 @@ class Person extends AbstractModel implements PersonInterface
132139
'name',
133140
'place_of_birth',
134141
'profile_path',
142+
'gender',
143+
'popularity'
135144
];
136145

137146
/**
@@ -522,4 +531,52 @@ public function setKnownFor($knownFor)
522531

523532
return $this;
524533
}
534+
535+
/**
536+
* @return bool
537+
*/
538+
public function isMale()
539+
{
540+
return $this->gender === 2;
541+
}
542+
543+
/**
544+
* @return bool
545+
*/
546+
public function isFemale()
547+
{
548+
return $this->gender === 1;
549+
}
550+
551+
/**
552+
* @return bool
553+
*/
554+
public function isUnknownGender()
555+
{
556+
return $this->gender === 0;
557+
}
558+
559+
/**
560+
* @param int $gender
561+
*/
562+
public function setGender($gender)
563+
{
564+
$this->gender = (int) $gender;
565+
}
566+
567+
/**
568+
* @return float
569+
*/
570+
public function getPopularity()
571+
{
572+
return $this->popularity;
573+
}
574+
575+
/**
576+
* @param float $popularity
577+
*/
578+
public function setPopularity($popularity)
579+
{
580+
$this->popularity = $popularity;
581+
}
525582
}

0 commit comments

Comments
 (0)