src/Scriptotek/Ncip/UserResponse.php
public function xml()
	{
		$userFields = array('agencyId', 'userId', 'firstName', 'lastName', 'email', 'phone', 'postalAddress');
		$loanFields = array('id', 'reminderLevel', 'title');

		$loanedItems = '';
		foreach ($this->loanedItems as $item) {
			$s = $this->loanTemplate;
			foreach ($loanFields as $field) {
				$s = str_replace('{{' . $field . '}}', $item[$field], $s);
			}
			$s = str_replace('{{dateDue}}', $this->formatDateTime($item['dateDue']), $s);
			$loanedItems .= $s;
		}

		$s = $this->template;
		foreach ($userFields as $field) {
			$s = str_replace('{{' . $field . '}}', $this->{$field}, $s);
		}
		$s = str_replace('{{loanedItems}}', $loanedItems, $s);

		return $s;
	}
public function xml()
	{
		$userFields = array('agencyId', 'userId', 'firstName', 'lastName', 'email', 'phone', 'postalAddress');
		$loanFields = array('id', 'reminderLevel', 'title');

		$loanedItems = '';
		foreach ($this->loanedItems as $item) {
			$s = $this->loanTemplate;
			foreach ($loanFields as $field) {
				$s = str_replace('{{' . $field . '}}', $item[$field], $s);
			}
			$s = str_replace('{{dateDue}}', $this->formatDateTime($item['dateDue']), $s);
			$loanedItems .= $s;
		}

		$s = $this->template;
		foreach ($userFields as $field) {
			$s = str_replace('{{' . $field . '}}', $this->{$field}, $s);
		}
		$s = str_replace('{{loanedItems}}', $loanedItems, $s);

		return $s;
	}
public function xml ( ) { $ userFields = array ( 'agencyId' , 'userId' , 'firstName' , 'lastName' , 'email' , 'phone' , 'postalAddress' ) ; $ loanFields = array ( 'id' , 'reminderLevel' , 'title' ) ; $ loanedItems = '' ; foreach ( $ this -> loanedItems as $ item ) { $ s = $ this -> loanTemplate ; foreach ( $ loanFields as $ field ) { $ s = str_replace ( '{{' . $ field . '}}' , $ item [ $ field ] , $ s ) ; } $ s = str_replace ( '{{dateDue}}' , $ this -> formatDateTime ( $ item [ 'dateDue' ] ) , $ s ) ; $ loanedItems .= $ s ; } $ s = $ this -> template ; foreach ( $ userFields as $ field ) { $ s = str_replace ( '{{' . $ field . '}}' , $ this -> { $ field } , $ s ) ; } $ s = str_replace ( '{{loanedItems}}' , $ loanedItems , $ s ) ; return $ s ; }
Return a XML representation of the request
Return a XML representation of the request