Youshido\Tests\StarWars\Schema\StarWarsData::getCharacter PHP 메소드

getCharacter() 정적인 공개 메소드

Helper function to get a character by ID.
static public getCharacter ( $id )
    static function getCharacter($id)
    {
        $humans = self::humans();
        $droids = self::droids();
        if (isset($humans[$id])) {
            return $humans[$id];
        }
        if (isset($droids[$id])) {
            return $droids[$id];
        }
        return null;
    }