public static function hydrate(stdClass $context)
    {
        $hydrated = new ContextEntity();

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

        if (isset($context->parts)) {
            $hydrated->setParts(PartHydrator::hydrateCollection($context->parts));
        }

        return $hydrated;
    }
public static function hydrate(stdClass $context)
    {
        $hydrated = new ContextEntity();

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

        if (isset($context->parts)) {
            $hydrated->setParts(PartHydrator::hydrateCollection($context->parts));
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ context ) { $ hydrated = new ContextEntity ( ) ; if ( isset ( $ context -> id ) ) { $ hydrated -> setId ( $ context -> id ) ; } if ( isset ( $ context -> parts ) ) { $ hydrated -> setParts ( PartHydrator :: hydrateCollection ( $ context -> parts ) ) ; } return $ hydrated ; }
Hydrate a context object into a ContextEntity object

@param stdClass $context
@return ContextEntity
Hydrate a context object into a ContextEntity object