public static function hydrate(stdClass $team)
    {
        $hydrated = new TeamEntity();

        if (isset($team->id)) {
            $hydrated->setId($team->id);
        }

        if (isset($team->name)) {
            $hydrated->setName($team->name);
        }

        if (isset($team->organization)) {
            $hydrated->setOrganization(OrgHydrator::hydrate($team->organization));
        }

        if (isset($team->users) && is_array($team->users)) {
            $hydrated->setUsers(UserHydrator::hydrateCollection($team->users));
        }

        if (isset($team->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($team->created_by));
        }

        if (isset($team->created_at)) {
            $hydrated->setCreatedAt(new DateTime($team->created_at));
        }

        return $hydrated;
    }
public static function hydrate(stdClass $team)
    {
        $hydrated = new TeamEntity();

        if (isset($team->id)) {
            $hydrated->setId($team->id);
        }

        if (isset($team->name)) {
            $hydrated->setName($team->name);
        }

        if (isset($team->organization)) {
            $hydrated->setOrganization(OrgHydrator::hydrate($team->organization));
        }

        if (isset($team->users) && is_array($team->users)) {
            $hydrated->setUsers(UserHydrator::hydrateCollection($team->users));
        }

        if (isset($team->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($team->created_by));
        }

        if (isset($team->created_at)) {
            $hydrated->setCreatedAt(new DateTime($team->created_at));
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ team ) { $ hydrated = new TeamEntity ( ) ; if ( isset ( $ team -> id ) ) { $ hydrated -> setId ( $ team -> id ) ; } if ( isset ( $ team -> name ) ) { $ hydrated -> setName ( $ team -> name ) ; } if ( isset ( $ team -> organization ) ) { $ hydrated -> setOrganization ( OrgHydrator :: hydrate ( $ team -> organization ) ) ; } if ( isset ( $ team -> users ) && is_array ( $ team -> users ) ) { $ hydrated -> setUsers ( UserHydrator :: hydrateCollection ( $ team -> users ) ) ; } if ( isset ( $ team -> created_by ) ) { $ hydrated -> setCreatedBy ( UserHydrator :: hydrate ( $ team -> created_by ) ) ; } if ( isset ( $ team -> created_at ) ) { $ hydrated -> setCreatedAt ( new DateTime ( $ team -> created_at ) ) ; } return $ hydrated ; }
Hydrate a team object into a TeamEntity object

@param stdClass $team
@return TeamEntity
Hydrate a team object into a TeamEntity object