/** * Binds a server end-point to a client end-point (internally, it creates a {@link __UIBinding} instance), allowing the synchronization from server to client but not the oposite way * It also set the bound direction to {@link __IEndPoing::BIND_DIRECTION_S2C} to both end-points * * @param __IServerEndPoint $sep * @param __IClientEndPoint $cep */ public function bindFromServerToClient(__IServerEndPoint $sep, __IClientEndPoint $cep) { $cep->setBoundDirection(__IEndPoint::BIND_DIRECTION_S2C); $sep->setBoundDirection(__IEndPoint::BIND_DIRECTION_S2C); $ui_binding = new __UIBinding($sep, $cep); $this->registerUIBinding($ui_binding); }
/** * Synchronize server end-point value according to the client end-point * * @todo add mapping values capability (translation rules for values from server to client end point) * * @param __IClientEndPoint $client_end_point */ public function synchronize(__IClientEndPoint &$client_end_point) { $value = $client_end_point->getValue(); return $this->_updateComponentProperty($value); }