public static function hydrate(stdClass $part)
    {
        $hydrated = new PartEntity();

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

        if (isset($part->type)) {
            $hydrated->setType($part->type);
        }

        if (isset($part->content)) {
            $hydrated->setContent($part->content);
        }

        return $hydrated;
    }
public static function hydrate(stdClass $part)
    {
        $hydrated = new PartEntity();

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

        if (isset($part->type)) {
            $hydrated->setType($part->type);
        }

        if (isset($part->content)) {
            $hydrated->setContent($part->content);
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ part ) { $ hydrated = new PartEntity ( ) ; if ( isset ( $ part -> id ) ) { $ hydrated -> setId ( $ part -> id ) ; } if ( isset ( $ part -> type ) ) { $ hydrated -> setType ( $ part -> type ) ; } if ( isset ( $ part -> content ) ) { $ hydrated -> setContent ( $ part -> content ) ; } return $ hydrated ; }
Hydrate a part object into a PartEntity object

@param stdClass $part
@return PartEntity
Hydrate a part object into a PartEntity object