new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::REQUIRED, 'int' ), ); $form = new ezcInputForm( INPUT_GET, $definition ); if ( $form->hasValidData( 'person' ) === false ) { throw new Exception( "No person ID given." ); } $this->id = $form->person; } public function run() { $session = ezcPersistentSessionInstance::get(); $this->person = $session->load( "ezcappContactPerson", $this->id ); $this->detail = $session->getRelatedObject( $this->person, "ezcappContactDetail" ); $this->emails = $session->getRelatedObjects( $this->person, "ezcappContactEmail" ); $this->addresses = $session->getRelatedObjects( $this->person, "ezcappContactAddress" ); $addressQuery = $session->createFindQuery( "ezcappContactAddress" ); $addressQuery->orderBy( "Zip" )->orderBy( "City" )->orderBy( "Street" ); $this->allAddresses = $session->find( $addressQuery, "ezcappContactAddress" ); } public function getTemplate() { return "show"; } } ?>