new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::REQUIRED, 'int' ), 'address' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::REQUIRED, 'int' ), ); $form = new ezcInputForm( INPUT_GET, $definition ); if ( $form->hasValidData( 'person' ) === false ) { throw new Exception( "No person ID given." ); } if ( $form->hasValidData( 'address' ) === false ) { throw new Exception( "No address given." ); } $session = ezcPersistentSessionInstance::get(); $this->person = $session->load( "ezcappContactPerson", $form->person ); $this->address = $session->load( "ezcappContactAddress", $form->address ); } public function run() { $session = ezcPersistentSessionInstance::get(); $session->removeRelatedObject( $this->person, $this->address ); } public function getTemplate() { return "removeaddress"; } } ?>