text:
<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns="http://webservice.voicebutler.odg.tonline.de"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.voicebutler.odg.tonline.de"
	elementFormDefault="unqualified" attributeFormDefault="unqualified"
	version="1.1">

	<xsd:simpleType name="EnvironmentType">
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="1" />
			<xsd:maxInclusive value="3" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="NumberType">
		<xsd:restriction base="xsd:string">
			<xsd:minLength value="7" />
			<xsd:maxLength value="24" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="SessionIDType">
		<xsd:restriction base="xsd:string">
			<xsd:pattern value="[0-9A-Z]{8}\-[0-9A-Z]{16}\-[0-9A-Z]{8}" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="KeepAliveType">
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="0" />
			<xsd:maxInclusive value="1" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="MaxDurationType">
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="0" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="ExpirationType">
		<xsd:restriction base="xsd:int">
			<xsd:minInclusive value="0" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:element name="callStatus">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="request" nillable="false"
					type="VoiceButlerCallStatusRequest" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
  <xsd:element name="callStatus2">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs="0" name="request" nillable="false"
          type="VoiceButlerCallStatusRequest" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
	<xsd:complexType name="VoiceButlerCallStatusRequest">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerRequest">
				<xsd:sequence>
					<xsd:element minOccurs="1" maxOccurs="1" name="keepAlive"
						nillable="false" type="KeepAliveType" />
					<xsd:element minOccurs="1" maxOccurs="1" name="sessionId"
						nillable="false" type="SessionIDType" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="newCall">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="request" nillable="false"
					type="VoiceButlerNewCallRequest" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="VoiceButlerNewCallRequest">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerNewCallRequestBase">
				<xsd:sequence>
					<xsd:element minOccurs="1" maxOccurs="1"
						name="bNumber" nillable="false" type="NumberType" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- newCall { -->
	<xsd:element name="newCallSequenced">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="request" nillable="false"
					type="VoiceButlerNewCallSequencedRequest" />

			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="newCallSequencedResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="return" type="VoiceButlerResult"></xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!-- newCall } -->

	<xsd:element name="tearDownCall">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="request" nillable="false"
					type="VoiceButlerTeardownCallRequest" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="VoiceButlerTeardownCallRequest">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerRequest">
				<xsd:sequence minOccurs="1" maxOccurs="1">
					<xsd:element name="sessionId" type="SessionIDType" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="callStatusResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="return" nillable="false"
					type="VoiceButlerCallStatusResult" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="VoiceButlerCallStatusResult">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerResult">
				<xsd:sequence minOccurs="0" maxOccurs="1">
					<xsd:element minOccurs="0" name="connectiontimea" type="xsd:int" />
					<xsd:element minOccurs="0" name="connectiontimeb" type="xsd:int" />
					<xsd:element minOccurs="0" name="descriptiona"
						nillable="true" type="xsd:string" />
					<xsd:element minOccurs="0" name="descriptionb"
						nillable="true" type="xsd:string" />
					<xsd:element minOccurs="0" name="reasona" type="xsd:int" />
					<xsd:element minOccurs="0" name="reasonb" type="xsd:int" />
					<xsd:element minOccurs="0" name="statea" type="xsd:string" />
					<xsd:element minOccurs="0" name="stateb" type="xsd:string" />
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

    <xsd:element name="callStatus2Response">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element minOccurs="0" name="return" nillable="false"
            type="VoiceButlerCallStatus2Result" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="VoiceButlerCallStatus2Result">
      <xsd:complexContent>
        <xsd:extension base="VoiceButlerResult">
          <xsd:sequence minOccurs="0" maxOccurs="1">
            <xsd:element minOccurs="0" name="connectiontimea" type="xsd:int" />
            <xsd:element minOccurs="0" name="connectiontimeb" type="xsd:int" />
            <xsd:element minOccurs="0" name="descriptiona"
              nillable="true" type="xsd:string" />
            <xsd:element minOccurs="0" name="descriptionb"
              nillable="true" type="xsd:string" />
            <xsd:element minOccurs="0" name="reasona" type="xsd:int" />
            <xsd:element minOccurs="0" name="reasonb" type="xsd:int" />
            <xsd:element minOccurs="0" name="statea" type="xsd:string" />
            <xsd:element minOccurs="0" name="stateb" type="xsd:string" />

            <xsd:element minOccurs="0" name="be164" type="xsd:string"
              nillable="true"/>
            <xsd:element minOccurs="0" name="bindex" type="xsd:int"
              nillable="true"/>
          </xsd:sequence>
        </xsd:extension>
      </xsd:complexContent>
    </xsd:complexType>
	<xsd:element name="newCallResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="0" name="return" nillable="false"
					type="VoiceButlerResult" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="tearDownCallResponse">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element minOccurs="1" name="return" nillable="false"
					type="VoiceButlerResult" />
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="VoiceButlerRequest">
		<xsd:sequence>
			<xsd:element minOccurs="1" maxOccurs="1" name="environment"
				nillable="false" type="EnvironmentType" />
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="VoiceButlerResult">
		<xsd:sequence>
			<xsd:element minOccurs="0" name="err_msg" nillable="true"
				type="xsd:string" />
			<xsd:element minOccurs="0" name="sessionId" nillable="true"
				type="xsd:string" />
			<xsd:element minOccurs="1" name="status" type="xsd:string" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="VoiceButlerNewCallSequencedRequest">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerNewCallRequestBase">
				<xsd:sequence>
					<xsd:element minOccurs="1" maxOccurs="unbounded"
						name="bNumber" nillable="false" type="NumberType" />
					<xsd:element name="maxWait" type="xsd:int" maxOccurs="1" minOccurs="1"></xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="VoiceButlerNewCallRequestBase">
		<xsd:complexContent>
			<xsd:extension base="VoiceButlerRequest">
				<xsd:sequence>
					<xsd:element minOccurs="1" maxOccurs="1"
						name="aNumber" nillable="false" type="NumberType" />
					<xsd:element minOccurs="1" maxOccurs="1"
						name="expiration" nillable="false" type="ExpirationType" />
					<xsd:element minOccurs="1" maxOccurs="1"
						name="maxDuration" nillable="false" type="MaxDurationType" />
					<xsd:element name="account" type="xsd:string"
						maxOccurs="1" minOccurs="0">
					</xsd:element>
					<xsd:element name="privacyA" type="xsd:boolean"
						maxOccurs="1" minOccurs="0">
					</xsd:element>
                    <xsd:element name="privacyB" type="xsd:boolean" maxOccurs="1" minOccurs="0"></xsd:element>
                    <xsd:element name="greeter" type="xsd:string"
						maxOccurs="1" minOccurs="0">
					</xsd:element>

				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
</xsd:schema>


text:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:schema="http://sts.idm.telekom.com/schema/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" xmlns:tns="http://sts.idm.telekom.com/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="sts" targetNamespace="http://sts.idm.telekom.com/wsdl/">
	<wsdl:types>
		<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://sts.idm.telekom.com/schema/" version="0.1" xmlns:tns="http://sts.idm.telekom.com/schema/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
			<xsd:complexType name="FaultResponse">
				<xsd:sequence>
					<xsd:element maxOccurs="1" minOccurs="1" name="code" nillable="false" type="xsd:string"/>
					<xsd:element maxOccurs="1" minOccurs="1" name="msg" nillable="false" type="xsd:string"/>
					<xsd:element maxOccurs="1" minOccurs="0" name="lockedUntil" nillable="true" type="xsd:dateTime"/>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:simpleType name="SecurityTokenFormatId">
				<xsd:annotation>
					<xsd:documentation>

					Telekom specific format id, e.g. there will be multiple
					different token formats derived from SAML 2.0 Assertions
				     </xsd:documentation>
				</xsd:annotation>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="saml20"/>
				</xsd:restriction>
			</xsd:simpleType>
			<xsd:simpleType name="SecurityTokenEncodingId">
				<xsd:annotation>
					<xsd:documentation>

					Telekom specific encoding id - there can be different
					encoding formats for the same token format, e.g. SAML
					Assertions can be encoded as plain XML or in
					base64-encoding
				     </xsd:documentation>
				</xsd:annotation>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="text/xml"/>
					<xsd:enumeration value="text/base64"/>
				</xsd:restriction>
			</xsd:simpleType>
			<xsd:complexType name="SecurityTokenResponse">
				<xsd:sequence>
					<xsd:element maxOccurs="1" minOccurs="1" name="tokenFormat" type="tns:SecurityTokenFormatId">
						<xsd:annotation>
							<xsd:documentation>

							format of the token carried by the response,
							determines syntax and processing rules for token
						       </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element maxOccurs="1" minOccurs="0" name="tokenEncoding" type="tns:SecurityTokenEncodingId">
						<xsd:annotation>
							<xsd:documentation>

							encoding of the token carried by the response,
							determines syntax and processing rules for token
						       </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element maxOccurs="1" minOccurs="1" name="tokenData" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>

							contains the string representation of the
							security token - no further token format identifier
						       </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="login">
				<xsd:sequence/>
			</xsd:complexType>
			<xsd:complexType name="getTokens">
				<xsd:sequence>
					<xsd:element maxOccurs="unbounded" minOccurs="1" name="serviceId" type="xsd:string">

				     </xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="getTokensResponse">
				<xsd:sequence>
					<xsd:element maxOccurs="unbounded" minOccurs="1" name="securityToken" type="tns:SecurityTokenResponse">

				     </xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="getTokensForSession">
				<xsd:sequence>
					<xsd:element maxOccurs="unbounded" minOccurs="1" name="serviceId" type="xsd:string">

				     </xsd:element>
					<xsd:element maxOccurs="1" minOccurs="1" name="ssid" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>

							valid SAM Session Id
						       </xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:simpleType name="IDType">
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="guid"/>
					<xsd:enumeration value="anid"/>
					<xsd:enumeration value="alia"/>
				</xsd:restriction>
			</xsd:simpleType>
			<xsd:complexType name="getTokensForUserId">
				<xsd:sequence>
					<xsd:element maxOccurs="unbounded" minOccurs="1" name="serviceId" type="xsd:string">

				     </xsd:element>
					<xsd:element name="uid" type="xsd:string"/>
					<xsd:element name="idx" type="tns:IDType"/>
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="authn" type="xsd:string"/>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:complexType name="getTokensForUserIdAndProfile">
				<xsd:sequence>
					<xsd:element maxOccurs="unbounded" minOccurs="1" name="serviceId" type="xsd:string">

				     </xsd:element>
					<xsd:element name="uid" type="xsd:string"/>
					<xsd:element name="idx" type="tns:IDType"/>
					<xsd:element maxOccurs="unbounded" minOccurs="0" name="authn" type="xsd:string"/>
					<xsd:element maxOccurs="1" minOccurs="1" name="profileId" type="xsd:string">

				     </xsd:element>
				</xsd:sequence>
			</xsd:complexType>
			<xsd:element name="FaultResponse" type="tns:FaultResponse"/>
			<xsd:element name="login" type="tns:login"/>
			<xsd:element name="loginResponse" type="tns:SecurityTokenResponse"/>
			<xsd:element name="getTokens" type="tns:getTokens"/>
			<xsd:element name="getTokensResponse" type="tns:getTokensResponse"/>
			<xsd:element name="getTokensForSessionResponse" type="tns:getTokensResponse"/>
			<xsd:element name="getTokensForUserIdResponse" type="tns:getTokensResponse"/>
			<xsd:element name="getTokensForUserIdAndProfileResponse" type="tns:getTokensResponse"/>
			<xsd:element name="getTokensForSession" type="tns:getTokensForSession"/>
			<xsd:element name="getTokensForUserId" type="tns:getTokensForUserId"/>
			<xsd:element name="getTokensForUserIdAndProfile" type="tns:getTokensForUserIdAndProfile"/>
		</xsd:schema>
	</wsdl:types>
	<wsdl:message name="FaultResponse">
		<wsdl:part name="fault" element="schema:FaultResponse"/>
	</wsdl:message>
	<wsdl:message name="loginRequest">
		<wsdl:part name="parameters" element="schema:login"/>
	</wsdl:message>
	<wsdl:message name="loginResponse">
		<wsdl:part name="parameters" element="schema:loginResponse"/>
	</wsdl:message>
	<wsdl:message name="getTokensRequest">
		<wsdl:part name="parameters" element="schema:getTokens"/>
	</wsdl:message>
	<wsdl:message name="getTokensResponse">
		<wsdl:part name="getTokensResponse" element="schema:getTokensResponse">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForSessionRequest">
		<wsdl:part name="parameters" element="schema:getTokensForSession">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForSessionResponse">
		<wsdl:part name="getTokensForSessionResponse" element="schema:getTokensForSessionResponse">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForUserIdRequest">
		<wsdl:part name="parameters" element="schema:getTokensForUserId">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForUserIdResponse">
		<wsdl:part name="getTokensForUserIdResponse" element="schema:getTokensForUserIdResponse">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForUserIdAndProfileRequest">
		<wsdl:part name="parameters" element="schema:getTokensForUserIdAndProfile">

      </wsdl:part>
	</wsdl:message>
	<wsdl:message name="getTokensForUserIdAndProfileResponse">
		<wsdl:part name="getTokensForUserIdAndProfileResponse" element="schema:getTokensForUserIdAndProfileResponse">

      </wsdl:part>
	</wsdl:message>
	<wsdl:portType name="SecurityTokenServiceWS">
		<wsdl:operation name="login">
			<wsdl:input message="tns:loginRequest"/>
			<wsdl:output message="tns:loginResponse"/>
			<wsdl:fault name="fault" message="tns:FaultResponse"/>
		</wsdl:operation>
		<wsdl:operation name="getTokens">
			<wsdl:input message="tns:getTokensRequest"/>
			<wsdl:output message="tns:getTokensResponse"/>
			<wsdl:fault name="fault" message="tns:FaultResponse"/>
		</wsdl:operation>
		<wsdl:operation name="getTokensForSession">
			<wsdl:input message="tns:getTokensForSessionRequest"/>
			<wsdl:output message="tns:getTokensForSessionResponse"/>
			<wsdl:fault name="fault" message="tns:FaultResponse"/>
		</wsdl:operation>
		<wsdl:operation name="getTokensForUserId">
			<wsdl:input message="tns:getTokensForUserIdRequest"/>
			<wsdl:output message="tns:getTokensForUserIdResponse"/>
			<wsdl:fault name="fault" message="tns:FaultResponse"/>
		</wsdl:operation>
		<wsdl:operation name="getTokensForUserIdAndProfile">
			<wsdl:input message="tns:getTokensForUserIdAndProfileRequest">

         </wsdl:input>
			<wsdl:output message="tns:getTokensForUserIdAndProfileResponse"/>
			<wsdl:fault name="fault" message="tns:FaultResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="SecurityTokenServiceSOAPBinding" type="tns:SecurityTokenServiceWS">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsp:PolicyReference URI="#TransportBindingPolicy"/>
		<wsdl:operation name="login">
			<soap:operation soapAction="http://sts.idm.telekom.com/wsdl/login"/>
			<wsdl:input>
				<wsp:PolicyReference URI="#UsernameTokenPolicy"/>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="fault">
				<soap:fault name="fault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="getTokens">
			<soap:operation soapAction="http://sts.idm.telekom.com/wsdl/getTokens"/>
			<wsdl:input>
				<wsp:PolicyReference URI="#SAMLTokenPolicy"/>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="fault">
				<soap:fault name="fault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="getTokensForSession">
			<soap:operation soapAction="http://sts.idm.telekom.com/wsdl/getTokensForSession"/>
			<wsdl:input>
				<wsp:PolicyReference URI="#SAMLTokenPolicy"/>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="fault">
				<soap:fault name="fault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="getTokensForUserId">
			<soap:operation soapAction="http://sts.idm.telekom.com/wsdl/getTokensForUserId"/>
			<wsdl:input>
				<wsp:PolicyReference URI="#SAMLTokenPolicy"/>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="fault">
				<soap:fault name="fault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="getTokensForUserIdAndProfile">
			<soap:operation soapAction="http://sts.idm.telekom.com/wsdl/getTokensForUserIdAndProfile"/>
			<wsdl:input>
				<wsp:PolicyReference URI="#SAMLTokenPolicy"/>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
			<wsdl:fault name="fault">
				<soap:fault name="fault" use="literal"/>
			</wsdl:fault>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="SecurityTokenService">
		<wsdl:port name="TokenService" binding="tns:SecurityTokenServiceSOAPBinding">
			<soap:address location="https://sts.idm.telekom.com/TokenService"/>
		</wsdl:port>
	</wsdl:service>
	<wsp:Policy wsu:Id="TransportBindingPolicy">
		<wsp:ExactlyOne>
			<wsp:All>
				<wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
				<sp:TransportBinding>
					<wsp:Policy>
						<sp:TransportToken>
							<wsp:Policy>
								<sp:HttpsToken RequireClientCertificate="false"/>
							</wsp:Policy>
						</sp:TransportToken>
						<sp:Layout>
							<wsp:Policy>
								<sp:Strict/>
							</wsp:Policy>
						</sp:Layout>
						<sp:IncludeTimestamp/>
						<sp:AlgorithmSuite>
							<wsp:Policy>
								<sp:Basic256/>
							</wsp:Policy>
						</sp:AlgorithmSuite>
					</wsp:Policy>
				</sp:TransportBinding>
				<sp:Wss11/>
			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>
	<wsp:Policy wsu:Id="UsernameTokenPolicy">
		<wsp:ExactlyOne>
			<wsp:All>
				<sp:SupportingTokens>
					<wsp:Policy>
						<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
							<wsp:Policy>
								<sp:WssUsernameToken11/>
							</wsp:Policy>
						</sp:UsernameToken>
					</wsp:Policy>
				</sp:SupportingTokens>
			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>
	<wsp:Policy wsu:Id="SAMLTokenPolicy">
		<wsp:ExactlyOne>
			<wsp:All>
				<sp:SupportingTokens>
					<wsp:Policy>
						<sp:SamlToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
							<wsp:Policy>
								<sp:WssSamlV20Token11/>
							</wsp:Policy>
						</sp:SamlToken>
					</wsp:Policy>
				</sp:SupportingTokens>
			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>
</wsdl:definitions>

repo_name: michael-romer/zf-boilerplate

repo_language: PHP

mime_type: text/html


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: AccountBalance.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @author     Marco Kaiser
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_DeveloperGarden_BaseUserService_AccountBalance
{
    /**
     * @var integer
     */
    public $Account = null;

    /**
     * @var integer $Credits
     */
    public $Credits = null;

    /**
     * returns the account id
     *
     * @return integer
     */
    public function getAccount()
    {
        return $this->Account;
    }

    /**
     * returns the credits
     *
     * @return integer
     */
    public function getCredits()
    {
        return $this->Credits;
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: SearchParameters.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @author     Marco Kaiser
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
{
    /**
     * possible search parameters, incl. default values
     *
     * @var array
     */
    private $_parameters = array(
        'what'             => null,
        'dymwhat'          => null,
        'dymrelated'       => null,
        'hits'             => null,
        'collapse'         => null,
        'where'            => null,
        'dywhere'          => null,
        'radius'           => null,
        'lx'               => null,
        'ly'               => null,
        'rx'               => null,
        'ry'               => null,
        'transformgeocode' => null,
        'sort'             => null,
        'spatial'          => null,
        'sepcomm'          => null,
        'filter'           => null, // can be ONLINER or OFFLINER
        'openingtime'      => null, // can be now or HH::MM
        'kategorie'        => null, // @see http://www.suchen.de/kategorie-katalog
        'site'             => null,
        'typ'              => null,
        'name'             => null,
        'page'             => null,
        'city'             => null,
        'plz'              => null,
        'strasse'          => null,
        'bundesland'       => null,
    );

    /**
     * possible collapse values
     *
     * @var array
     */
    private $_possibleCollapseValues = array(
        true,
        false,
        'ADDRESS_COMPANY',
        'DOMAIN'
    );

    /**
     * sets a new search word
     * alias for setWhat
     *
     * @param string $searchValue
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setSearchValue($searchValue)
    {
        return $this->setWhat($searchValue);
    }

    /**
     * sets a new search word
     *
     * @param string $searchValue
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setWhat($searchValue)
    {
        $this->_parameters['what'] = $searchValue;
        return $this;
    }

    /**
     * enable the did you mean what feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function enableDidYouMeanWhat()
    {
        $this->_parameters['dymwhat'] = 'true';
        return $this;
    }

    /**
     * disable the did you mean what feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disableDidYouMeanWhat()
    {
        $this->_parameters['dymwhat'] = 'false';
        return $this;
    }

    /**
     * enable the did you mean where feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function enableDidYouMeanWhere()
    {
        $this->_parameters['dymwhere'] = 'true';
        return $this;
    }

    /**
     * disable the did you mean where feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disableDidYouMeanWhere()
    {
        $this->_parameters['dymwhere'] = 'false';
        return $this;
    }

    /**
     * enable did you mean related, if true Kihno will be corrected to Kino
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function enableDidYouMeanRelated()
    {
        $this->_parameters['dymrelated'] = 'true';
        return $this;
    }

    /**
     * diable did you mean related, if false Kihno will not be corrected to Kino
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disableDidYouMeanRelated()
    {
        $this->_parameters['dymrelated'] = 'true';
        return $this;
    }

    /**
     * set the max result hits for this search
     *
     * @param integer $hits
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setHits($hits = 10)
    {
        require_once 'Zend/Validate/Between.php';
        $validator = new Zend_Validate_Between(0, 1000);
        if (!$validator->isValid($hits)) {
            $message = $validator->getMessages();
            require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php';
            throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message));
        }
        $this->_parameters['hits'] = $hits;
        return $this;
    }

    /**
     * If true, addresses will be collapsed for a single domain, common values
     * are:
     * ADDRESS_COMPANY – to collapse by address
     * DOMAIN – to collapse by domain (same like collapse=true)
     * false
     *
     * @param mixed $value
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setCollapse($value)
    {
        if (!in_array($value, $this->_possibleCollapseValues, true)) {
            require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php';
            throw new Zend_Service_DeveloperGarden_LocalSearch_Exception('Not a valid value provided.');
        }
        $this->_parameters['collapse'] = $value;
        return $this;
    }

    /**
     * set a specific search location
     * examples:
     * +47°54’53.10”, 11° 10’ 56.76”
     * 47°54’53.10;11°10’56.76”
     * 47.914750,11.182533
     * +47.914750 ; +11.1824
     * Darmstadt
     * Berlin
     *
     * @param string $where
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setWhere($where)
    {
        require_once 'Zend/Validate/NotEmpty.php';

        $validator = new Zend_Validate_NotEmpty();
        if (!$validator->isValid($where)) {
            $message = $validator->getMessages();
            require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php';
            throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message));
        }
        $this->_parameters['where'] = $where;
        return $this;
    }

    /**
     * returns the defined search location (ie city, country)
     *
     * @return string
     */
    public function getWhere()
    {
        return $this->_parameters['where'];
    }

    /**
     * enable the spatial search feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function enableSpatial()
    {
        $this->_parameters['spatial'] = 'true';
        return $this;
    }

    /**
     * disable the spatial search feature
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disableSpatial()
    {
        $this->_parameters['spatial'] = 'false';
        return $this;
    }

    /**
     * sets spatial and the given radius for a circle search
     *
     * @param integer $radius
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setRadius($radius)
    {
        require_once 'Zend/Validate/Int.php';

        $validator = new Zend_Validate_Int();
        if (!$validator->isValid($radius)) {
            $message = $validator->getMessages();
            require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php';
            throw new Zend_Service_DeveloperGarden_LocalSearch_Exception(current($message));
        }
        $this->_parameters['radius'] = $radius;
        $this->_parameters['transformgeocode'] = 'false';

        return $this;
    }

    /**
     * sets the values for a rectangle search
     * lx = longitude left top
     * ly = latitude left top
     * rx = longitude right bottom
     * ry = latitude right bottom
     *
     * @param float $lx
     * @param float $ly
     * @param float $rx
     * @param float $ry
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setRectangle($lx, $ly, $rx, $ry)
    {
        $this->_parameters['lx'] = $lx;
        $this->_parameters['ly'] = $ly;
        $this->_parameters['rx'] = $rx;
        $this->_parameters['ry'] = $ry;

        return $this;
    }

    /**
     * if set, the service returns the zipcode for the result
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setTransformGeoCode()
    {
        $this->_parameters['transformgeocode'] = 'true';
        $this->_parameters['radius']           = null;

        return $this;
    }

    /**
     * sets the sort value
     * possible values are: 'relevance' and 'distance' (only with spatial enabled)
     *
     * @param string $sort
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setSort($sort)
    {
        if (!in_array($sort, array('relevance', 'distance'))) {
            require_once 'Zend/Service/DeveloperGarden/LocalSearch/Exception.php';
            throw new Zend_Service_DeveloperGarden_LocalSearch_Exception('Not a valid sort value provided.');
        }

        $this->_parameters['sort'] = $sort;
        return $this;
    }

    /**
     * enable the separation of phone numbers
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function enablePhoneSeparation()
    {
        $this->_parameters['sepcomm'] = 'true';
        return $this;
    }

    /**
     * disable the separation of phone numbers
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disablePhoneSeparation()
    {
        $this->_parameters['sepcomm'] = 'true';
        return $this;
    }

    /**
     * if this filter is set, only results with a website are returned
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setFilterOnliner()
    {
        $this->_parameters['filter'] = 'ONLINER';
        return $this;
    }

    /**
     * if this filter is set, only results without a website are returned
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setFilterOffliner()
    {
        $this->_parameters['filter'] = 'OFFLINER';
        return $this;
    }

    /**
     * removes the filter value
     *
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function disableFilter()
    {
        $this->_parameters['filter'] = null;
        return $this;
    }

    /**
     * set a filter to get just results who are open at the given time
     * possible values:
     * now = open right now
     * HH:MM = at the given time (ie 20:00)
     *
     * @param string $time
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setOpeningTime($time = null)
    {
        $this->_parameters['openingtime'] = $time;
        return $this;
    }

    /**
     * sets a category filter
     *
     * @see http://www.suchen.de/kategorie-katalog
     * @param string $category
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setCategory($category = null)
    {
        $this->_parameters['kategorie'] = $category;
        return $this;
    }

    /**
     * sets the site filter
     * ie: www.developergarden.com
     *
     * @param string $site
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setSite($site)
    {
        $this->_parameters['site'] = $site;
        return $this;
    }

    /**
     * sets a filter to the given document type
     * ie: pdf, html
     *
     * @param string $type
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setDocumentType($type)
    {
        $this->_parameters['typ'] = $type;
        return $this;
    }

    /**
     * sets a filter for the company name
     * ie: Deutsche Telekom
     *
     * @param string $name
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setName($name)
    {
        $this->_parameters['name'] = $name;
        return $this;
    }

    /**
     * sets a filter for the zip code
     *
     * @param string $zip
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setZipCode($zip)
    {
        $this->_parameters['plz'] = $zip;
        return $this;
    }

    /**
     * sets a filter for the street
     *
     * @param string $street
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setStreet($street)
    {
        $this->_parameters['strasse'] = $street;
        return $this;
    }

    /**
     * sets a filter for the county
     *
     * @param string $county
     * @return Zend_Service_DeveloperGarden_LocalSearch_SearchParameters
     */
    public function setCounty($county)
    {
        $this->_parameters['bundesland'] = $county;
        return $this;
    }

    /**
     * sets a raw parameter with the value
     *
     * @param string $key
     * @param mixed $value
     * @return unknown_type
     */
    public function setRawParameter($key, $value)
    {
        $this->_parameters[$key] = $value;
        return $this;
    }

    /**
     * returns the parameters as an array
     *
     * @return array
     */
    public function getSearchParameters()
    {
        $retVal = array();
        foreach ($this->_parameters as $key => $value) {
            if ($value === null) {
                continue;
            }
            $param = array(
                'parameter' => $key,
                'value' => $value
            );
            $retVal[] = $param;
        }
        return $retVal;
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Zend_Service_Exception
 */
require_once 'Zend/Service/DeveloperGarden/Exception.php';

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage DeveloperGarden
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @author     Marco Kaiser
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_DeveloperGarden_LocalSearch_Exception extends Zend_Service_DeveloperGarden_Exception
{
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @see Zend_Service_Exception
 */
require_once 'Zend/Service/Exception.php';

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Delicious_Exception extends Zend_Service_Exception
{}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: PostList.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * List of posts retrived from the del.icio.us web service
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Delicious_PostList implements Countable, Iterator, ArrayAccess
{
    /**
     * @var array Array of Zend_Service_Delicious_Post
     */
    protected $_posts = array();

    /**
     * @var Zend_Service_Delicious Service that has downloaded the post list
     */
    protected $_service;

    /**
     * @var int Iterator key
     */
    protected $_iteratorKey = 0;

    /**
     * @param  Zend_Service_Delicious $service Service that has downloaded the post
     * @param  DOMNodeList|array      $posts
     * @return void
     */
    public function __construct(Zend_Service_Delicious $service, $posts = null)
    {
        $this->_service = $service;
        if ($posts instanceof DOMNodeList) {
            $this->_constructFromNodeList($posts);
        } else if (is_array($posts)) {
            $this->_constructFromArray($posts);
        }
    }

    /**
     * Transforms DOMNodeList to array of posts
     *
     * @param  DOMNodeList $nodeList
     * @return void
     */
    private function _constructFromNodeList(DOMNodeList $nodeList)
    {
        for ($i = 0; $i < $nodeList->length; $i++) {
            $curentNode = $nodeList->item($i);
            if($curentNode->nodeName == 'post') {
                $this->_addPost(new Zend_Service_Delicious_Post($this->_service, $curentNode));
            }
        }
    }

    /**
     * Transforms the Array to array of posts
     *
     * @param  array $postList
     * @return void
     */
    private function _constructFromArray(array $postList)
    {
        foreach ($postList as $f_post) {
            $this->_addPost(new Zend_Service_Delicious_SimplePost($f_post));
        }
    }

    /**
     * Add a post
     *
     * @param  Zend_Service_Delicious_SimplePost $post
     * @return Zend_Service_Delicious_PostList
     */
    protected function _addPost(Zend_Service_Delicious_SimplePost $post)
    {
        $this->_posts[] = $post;

        return $this;
    }

    /**
     * Filter list by list of tags
     *
     * @param  array $tags
     * @return Zend_Service_Delicious_PostList
     */
    public function withTags(array $tags)
    {
        $postList = new self($this->_service);

        foreach ($this->_posts as $post) {
            if (count(array_diff($tags, $post->getTags())) == 0) {
                $postList->_addPost($post);
            }
        }

        return $postList;
    }

    /**
     * Filter list by tag
     *
     * @param  string $tag
     * @return Zend_Service_Delicious_PostList
     */
    public function withTag($tag)
    {
        return $this->withTags(func_get_args());
    }

    /**
     * Filter list by urls matching a regular expression
     *
     * @param  string $regexp
     * @return Zend_Service_Delicious_PostList
     */
    public function withUrl($regexp)
    {
        $postList = new self($this->_service);

        foreach ($this->_posts as $post) {
            if (preg_match($regexp, $post->getUrl())) {
                $postList->_addPost($post);
            }
        }

        return $postList;
    }

    /**
     * Return number of posts
     *
     * Implement Countable::count()
     *
     * @return int
     */
    public function count()
    {
        return count($this->_posts);
    }

    /**
     * Return the current element
     *
     * Implement Iterator::current()
     *
     * @return Zend_Service_Delicious_SimplePost
     */
    public function current()
    {
        return $this->_posts[$this->_iteratorKey];
    }

    /**
     * Return the key of the current element
     *
     * Implement Iterator::key()
     *
     * @return int
     */
    public function key()
    {
        return $this->_iteratorKey;
    }

    /**
     * Move forward to next element
     *
     * Implement Iterator::next()
     *
     * @return void
     */
    public function next()
    {
        $this->_iteratorKey += 1;
    }

    /**
     * Rewind the Iterator to the first element
     *
     * Implement Iterator::rewind()
     *
     * @return void
     */
    public function rewind()
    {
        $this->_iteratorKey = 0;
    }

    /**
     * Check if there is a current element after calls to rewind() or next()
     *
     * Implement Iterator::valid()
     *
     * @return bool
     */
    public function valid()
    {
        $numItems = $this->count();

        if ($numItems > 0 && $this->_iteratorKey < $numItems) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Whether the offset exists
     *
     * Implement ArrayAccess::offsetExists()
     *
     * @param   int     $offset
     * @return  bool
     */
    public function offsetExists($offset)
    {
        return ($offset < $this->count());
    }

    /**
     * Return value at given offset
     *
     * Implement ArrayAccess::offsetGet()
     *
     * @param   int     $offset
     * @throws  OutOfBoundsException
     * @return  Zend_Service_Delicious_SimplePost
     */
    public function offsetGet($offset)
    {
        if ($this->offsetExists($offset)) {
            return $this->_posts[$offset];
        } else {
            throw new OutOfBoundsException('Illegal index');
        }
    }

    /**
     * Throws exception because all values are read-only
     *
     * Implement ArrayAccess::offsetSet()
     *
     * @param   int     $offset
     * @param   string  $value
     * @throws  Zend_Service_Delicious_Exception
     */
    public function offsetSet($offset, $value)
    {
        /**
         * @see Zend_Service_Delicious_Exception
         */
        require_once 'Zend/Service/Delicious/Exception.php';
        throw new Zend_Service_Delicious_Exception('You are trying to set read-only property');
    }

    /**
     * Throws exception because all values are read-only
     *
     * Implement ArrayAccess::offsetUnset()
     *
     * @param   int     $offset
     * @throws  Zend_Service_Delicious_Exception
     */
    public function offsetUnset($offset)
    {
        /**
         * @see Zend_Service_Delicious_Exception
         */
        require_once 'Zend/Service/Delicious/Exception.php';
        throw new Zend_Service_Delicious_Exception('You are trying to unset read-only property');
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Post.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @see Zend_Date
 */
require_once 'Zend/Date.php';

/**
 * @see Zend_Service_Delicious_SimplePost
 */
require_once 'Zend/Service/Delicious/SimplePost.php';

/**
 * Zend_Service_Delicious_Post represents a post of a user that can be edited
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Delicious_Post extends Zend_Service_Delicious_SimplePost
{
    /**
     * Service that has downloaded the post
     *
     * @var Zend_Service_Delicious
     */
    protected $_service;

    /**
     * @var int Number of people that have the same post
     */
    protected $_others;

    /**
     * @var Zend_Date Post date
     */
    protected $_date;

    /**
     * @var bool Post share
     */
    protected $_shared = true;

    /**
     * @var string Post hash
     */
    protected $_hash;

    /**
     * Constructs a new del.icio.us post
     *
     * @param  Zend_Service_Delicious $service Service that has downloaded the post
     * @param  DOMElement|array       $values  Post content
     * @throws Zend_Service_Delicious_Exception
     * @return void
     */
    public function __construct(Zend_Service_Delicious $service, $values)
    {
        $this->_service = $service;

        if ($values instanceof DOMElement) {
            $values = self::_parsePostNode($values);
        }

        if (!is_array($values) || !isset($values['url']) || !isset($values['title'])) {
            /**
             * @see Zend_Service_Delicious_Exception
             */
            require_once 'Zend/Service/Delicious/Exception.php';
            throw new Zend_Service_Delicious_Exception("Second argument must be array with at least 2 keys ('url' and"
                                                     . " 'title')");
        }

        if (isset($values['date']) && ! $values['date'] instanceof Zend_Date) {
            /**
             * @see Zend_Service_Delicious_Exception
             */
            require_once 'Zend/Service/Delicious/Exception.php';
            throw new Zend_Service_Delicious_Exception("Date has to be an instance of Zend_Date");
        }

        foreach (array('url', 'title', 'notes', 'others', 'tags', 'date', 'shared', 'hash') as $key) {
            if (isset($values[$key])) {
                $this->{"_$key"}  = $values[$key];
            }
        }
    }

    /**
     * Setter for title
     *
     * @param  string $newTitle
     * @return Zend_Service_Delicious_Post
     */
    public function setTitle($newTitle)
    {
        $this->_title = (string) $newTitle;

        return $this;
    }

    /**
     * Setter for notes
     *
     * @param  string $newNotes
     * @return Zend_Service_Delicious_Post
     */
    public function setNotes($newNotes)
    {
        $this->_notes = (string) $newNotes;

        return $this;
    }

    /**
     * Setter for tags
     *
     * @param  array $tags
     * @return Zend_Service_Delicious_Post
     */
    public function setTags(array $tags)
    {
        $this->_tags = $tags;

        return $this;
    }

    /**
     * Add a tag
     *
     * @param  string $tag
     * @return Zend_Service_Delicious_Post
     */
    public function addTag($tag)
    {
        $this->_tags[] = (string) $tag;

        return $this;
    }

    /**
     * Remove a tag
     *
     * @param  string $tag
     * @return Zend_Service_Delicious_Post
     */
    public function removeTag($tag)
    {
        $this->_tags = array_diff($this->_tags, array((string) $tag));

        return $this;
    }

    /**
     * Getter for date
     *
     * @return Zend_Date
     */
    public function getDate()
    {
        return $this->_date;
    }

    /**
     * Getter for others
     *
     * This property is only populated when posts are retrieved
     * with getPosts() method. The getAllPosts() and getRecentPosts()
     * methods will not populate this property.
     *
     * @return int
     */
    public function getOthers()
    {
        return $this->_others;
    }

    /**
     * Getter for hash
     *
     * @return string
     */
    public function getHash()
    {
        return $this->_hash;
    }

    /**
     * Getter for shared
     *
     * @return bool
     */
    public function getShared()
    {
        return $this->_shared;
    }

    /**
     * Setter for shared
     *
     * @param  bool $isShared
     * @return Zend_Service_Delicious_Post
     */
    public function setShared($isShared)
    {
        $this->_shared = (bool) $isShared;

        return $this;
    }

    /**
     * Deletes post
     *
     * @return Zend_Service_Delicious
     */
    public function delete()
    {
        return $this->_service->deletePost($this->_url);
    }

    /**
     * Saves post
     *
     * @return DOMDocument
     */
    public function save()
    {
        $parms = array(
            'url'        => $this->_url,
            'description'=> $this->_title,
            'extended'   => $this->_notes,
            'shared'     => ($this->_shared ? 'yes' : 'no'),
            'tags'       => implode(' ', (array) $this->_tags),
            'replace'    => 'yes'
        );
        /*
        if ($this->_date instanceof Zend_Date) {
            $parms['dt'] = $this->_date->get('Y-m-d\TH:i:s\Z');
        }
        */

        return $this->_service->makeRequest(Zend_Service_Delicious::PATH_POSTS_ADD, $parms);
    }

    /**
     * Extracts content from the DOM element of a post
     *
     * @param  DOMElement $node
     * @return array
     */
    protected static function _parsePostNode(DOMElement $node)
    {
        return array(
            'url'    => $node->getAttribute('href'),
            'title'  => $node->getAttribute('description'),
            'notes'  => $node->getAttribute('extended'),
            'others' => (int) $node->getAttribute('others'),
            'tags'   => explode(' ', $node->getAttribute('tag')),
            /**
             * @todo replace strtotime() with Zend_Date equivalent
             */
            'date'   => new Zend_Date(strtotime($node->getAttribute('time'))),
            'shared' => ($node->getAttribute('shared') == 'no' ? false : true),
            'hash'   => $node->getAttribute('hash')
        );
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: SimplePost.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * Represents a publicly available post
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Delicious
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Delicious_SimplePost
{
    /**
     * @var string Post url
     */
    protected $_url;

    /**
     * @var string Post title
     */
    protected $_title;

    /**
     * @var string Post notes
     */
    protected $_notes;

    /**
     * @var array Post tags
     */
    protected $_tags = array();

    /**
     * Constructor
     *
     * @param   array $post Post data
     * @return  void
     * @throws  Zend_Service_Delicious_Exception
     */
    public function __construct(array $post)
    {
        if (!isset($post['u']) || !isset($post['d'])) {
            /**
             * @see Zend_Service_Delicious_Exception
             */
            require_once 'Zend/Service/Delicious/Exception.php';
            throw new Zend_Service_Delicious_Exception('Title and URL not set.');
        }

        $this->_url   = $post['u'];
        $this->_title = $post['d'];

        if (isset($post['t'])) {
            $this->_tags = $post['t'];
        }
        if (isset($post['n'])) {
            $this->_notes = $post['n'];
        }
    }

    /**
     * Getter for URL
     *
     * @return string
     */
    public function getUrl()
    {
        return $this->_url;
    }

    /**
     * Getter for title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->_title;
    }

    /**
     * Getter for notes
     *
     * @return string
     */
    public function getNotes()
    {
        return $this->_notes;
    }

    /**
     * Getter for tags
     *
     * @return array
     */
    public function getTags()
    {
        return $this->_tags;
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage SlideShare
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @see Zend_Service_Exception
 */
require_once 'Zend/Service/Exception.php';

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage SlideShare
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_SlideShare_Exception extends Zend_Service_Exception
{
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage SlideShare
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: SlideShow.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * The Zend_Service_SlideShare_SlideShow class represents a slide show on the
 * slideshare.net servers.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage SlideShare
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_SlideShare_SlideShow
{

    /**
     * Status constant mapping for web service
     *
     */
    const STATUS_QUEUED = 0;
    const STATUS_PROCESSING = 1;
    const STATUS_READY = 2;
    const STATUS_FAILED = 3;

    /**
     * The HTML code to embed the slide show in a web page
     *
     * @var string the HTML to embed the slide show
     */
    protected $_embedCode;

    /**
     * The URI for the thumbnail representation of the slide show
     *
     * @var string The URI of a thumbnail image
     */
    protected $_thumbnailUrl;

    /**
     * The title of the slide show
     *
     * @var string The slide show title
     */
    protected $_title;

    /**
     * The Description of the slide show
     *
     * @var string The slide show description
     */
    protected $_description;

    /**
     * The status of the silde show on the server
     *
     * @var int The Slide show status code
     */
    protected $_status;

    /**
     * The Description of the slide show status code
     *
     * @var string The status description
     */
    protected $_statusDescription;

    /**
     * The Permanent link for the slide show
     *
     * @var string the Permalink for the slide show
     */
    protected $_permalink;

    /**
     * The number of views this slide show has received
     *
     * @var int the number of views
     */
    protected $_numViews;

    /**
     * The ID of the slide show on the server
     *
     * @var int the Slide show ID number on the server
     */
    protected $_slideShowId;

    /**
     * A slide show filename on the local filesystem (when uploading)
     *
     * @var string the local filesystem path & file of the slide show to upload
     */
    protected $_slideShowFilename;

    /**
     * An array of tags associated with the slide show
     *
     * @var array An array of tags associated with the slide show
     */
    protected $_tags = array();

    /**
     * The location of the slide show
     *
     * @var string the Location
     */
    protected $_location;

    /**
     * The transcript associated with the slide show
     *
     * @var string the Transscript
     */
    protected $_transcript;

    /**
     * Retrieves the location of the slide show
     *
     * @return string the Location
     */
    public function getLocation()
    {
        return $this->_location;
    }

    /**
     * Sets the location of the slide show
     *
     * @param string $loc The location to use
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setLocation($loc)
    {
        $this->_location = (string)$loc;
        return $this;
    }

    /**
     * Gets the transcript for this slide show
     *
     * @return string the Transcript
     */
    public function getTranscript()
    {
        return $this->_transcript;
    }

    /**
     * Sets the transcript for this slide show
     *
     * @param string $t The transcript
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setTranscript($t)
    {
        $this->_transcript = (string)$t;
        return $this;
    }

    /**
     * Adds a tag to the slide show
     *
     * @param string $tag The tag to add
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function addTag($tag)
    {
        $this->_tags[] = (string)$tag;
        return $this;
    }

    /**
     * Sets the tags for the slide show
     *
     * @param array $tags An array of tags to set
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setTags(Array $tags)
    {
        $this->_tags = $tags;
        return $this;
    }

    /**
     * Gets all of the tags associated with the slide show
     *
     * @return array An array of tags for the slide show
     */
    public function getTags()
    {
        return $this->_tags;
    }

    /**
     * Sets the filename on the local filesystem of the slide show
     * (for uploading a new slide show)
     *
     * @param string $file The full path & filename to the slide show
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setFilename($file)
    {
        $this->_slideShowFilename = (string)$file;
        return $this;
    }

    /**
     * Retrieves the filename on the local filesystem of the slide show
     * which will be uploaded
     *
     * @return string The full path & filename to the slide show
     */
    public function getFilename()
    {
        return $this->_slideShowFilename;
    }

    /**
     * Sets the ID for the slide show
     *
     * @param int $id The slide show ID
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setId($id)
    {
        $this->_slideShowId = (string)$id;
        return $this;
    }

    /**
     * Gets the ID for the slide show
     *
     * @return int The slide show ID
     */
    public function getId()
    {
        return $this->_slideShowId;
    }

    /**
     * Sets the HTML embed code for the slide show
     *
     * @param string $code The HTML embed code
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setEmbedCode($code)
    {
        $this->_embedCode = (string)$code;
        return $this;
    }

    /**
     * Retrieves the HTML embed code for the slide show
     *
     * @return string the HTML embed code
     */
    public function getEmbedCode()
    {
        return $this->_embedCode;
    }

    /**
     * Sets the Thumbnail URI for the slide show
     *
     * @param string $url The URI for the thumbnail image
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setThumbnailUrl($url)
    {
        $this->_thumbnailUrl = (string) $url;
        return $this;
    }

    /**
     * Retrieves the Thumbnail URi for the slide show
     *
     * @return string The URI for the thumbnail image
     */
    public function getThumbnailUrl()
    {
        return $this->_thumbnailUrl;
    }

    /**
     * Sets the title for the Slide show
     *
     * @param string $title The slide show title
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setTitle($title)
    {
        $this->_title = (string)$title;
        return $this;
    }

    /**
     * Retrieves the Slide show title
     *
     * @return string the Slide show title
     */
    public function getTitle()
    {
        return $this->_title;
    }

    /**
     * Sets the description for the Slide show
     *
     * @param strign $desc The description of the slide show
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setDescription($desc)
    {
        $this->_description = (string)$desc;
        return $this;
    }

    /**
     * Gets the description of the slide show
     *
     * @return string The slide show description
     */
    public function getDescription()
    {
        return $this->_description;
    }

    /**
     * Sets the numeric status of the slide show on the server
     *
     * @param int $status The numeric status on the server
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setStatus($status)
    {
        $this->_status = (int)$status;
        return $this;
    }

    /**
     * Gets the numeric status of the slide show on the server
     *
     * @return int A Zend_Service_SlideShare_SlideShow Status constant
     */
    public function getStatus()
    {
        return $this->_status;
    }

    /**
     * Sets the textual description of the status of the slide show on the server
     *
     * @param string $desc The textual description of the status of the slide show
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setStatusDescription($desc)
    {
        $this->_statusDescription = (string)$desc;
        return $this;
    }

    /**
     * Gets the textual description of the status of the slide show on the server
     *
     * @return string the textual description of the service
     */
    public function getStatusDescription()
    {
        return $this->_statusDescription;
    }

    /**
     * Sets the permanent link of the slide show
     *
     * @param string $url The permanent URL for the slide show
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setPermaLink($url)
    {
        $this->_permalink = (string)$url;
        return $this;
    }

    /**
     * Gets the permanent link of the slide show
     *
     * @return string the permanent URL for the slide show
     */
    public function getPermaLink()
    {
        return $this->_permalink;
    }

    /**
     * Sets the number of views the slide show has received
     *
     * @param int $views The number of views
     * @return Zend_Service_SlideShare_SlideShow
     */
    public function setNumViews($views)
    {
        $this->_numViews = (int)$views;
        return $this;
    }

    /**
     * Gets the number of views the slide show has received
     *
     * @return int The number of views
     */
    public function getNumViews()
    {
        return $this->_numViews;
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/** @see Zend_Service_Exception */
require_once 'Zend/Service/Exception.php';

/**
 * Zend_Service_ReCaptcha_Exception
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Service_ReCaptcha_Exception extends Zend_Service_Exception
{}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/** @see Zend_Service_ReCaptcha */
require_once 'Zend/Service/ReCaptcha.php';

/**
 * Zend_Service_ReCaptcha_MailHide
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: MailHide.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Service_ReCaptcha_MailHide extends Zend_Service_ReCaptcha
{
    /**#@+
     * Encryption constants
     */
    const ENCRYPTION_MODE = MCRYPT_MODE_CBC;
    const ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128;
    const ENCRYPTION_BLOCK_SIZE = 16;
    const ENCRYPTION_IV = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
    /**#@-*/

    /**
     * Url to the mailhide server
     *
     * @var string
     */
    const MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d';

    /**
     * The email address to protect
     *
     * @var string
     */
    protected $_email = null;

    /**
     * @var Zend_Validate_Interface
     */
    protected $_emailValidator;

    /**
     * Binary representation of the private key
     *
     * @var string
     */
    protected $_privateKeyPacked = null;

    /**
     * The local part of the email
     *
     * @var string
     */
    protected $_emailLocalPart = null;

    /**
     * The domain part of the email
     *
     * @var string
     */
    protected $_emailDomainPart = null;

    /**
     * Local constructor
     *
     * @param string $publicKey
     * @param string $privateKey
     * @param string $email
     * @param array|Zend_Config $options
     */
    public function __construct($publicKey = null, $privateKey = null, $email = null, $options = null)
    {
        /* Require the mcrypt extension to be loaded */
        $this->_requireMcrypt();

        /* If options is a Zend_Config object we want to convert it to an array so we can merge it with the default options */
        if ($options instanceof Zend_Config) {
            $options = $options->toArray();
        }

        /* Merge if needed */
        if (is_array($options)) {
            $options = array_merge($this->getDefaultOptions(), $options);
        } else {
            $options = $this->getDefaultOptions();
        }

        parent::__construct($publicKey, $privateKey, null, $options);

        if ($email !== null) {
            $this->setEmail($email);
        }
    }

    /**
     * Get emailValidator
     *
     * @return Zend_Validate_Interface
     */
    public function getEmailValidator()
    {
        if (null === $this->_emailValidator) {
            require_once 'Zend/Validate/EmailAddress.php';
            $this->setEmailValidator(new Zend_Validate_EmailAddress());
        }
        return $this->_emailValidator;
    }

    /**
     * Set email validator
     *
     * @param  Zend_Validate_Interface $validator
     * @return Zend_Service_ReCaptcha_MailHide
     */
    public function setEmailValidator(Zend_Validate_Interface $validator)
    {
        $this->_emailValidator = $validator;
        return $this;
    }

    /**
     * See if the mcrypt extension is available
     *
     * @throws Zend_Service_ReCaptcha_MailHide_Exception
     */
    protected function _requireMcrypt()
    {
        if (!extension_loaded('mcrypt')) {
            /** @see Zend_Service_ReCaptcha_MailHide_Exception */
            require_once 'Zend/Service/ReCaptcha/MailHide/Exception.php';

            throw new Zend_Service_ReCaptcha_MailHide_Exception('Use of the Zend_Service_ReCaptcha_MailHide component requires the mcrypt extension to be enabled in PHP');
        }
    }

    /**
     * Serialize as string
     *
     * When the instance is used as a string it will display the email address. Since we can't
     * throw exceptions within this method we will trigger a user warning instead.
     *
     * @return string
     */
    public function __toString()
    {
        try {
            $return = $this->getHtml();
        } catch (Exception $e) {
            $return = '';
            trigger_error($e->getMessage(), E_USER_WARNING);
        }

        return $return;
    }

    /**
     * Get the default set of parameters
     *
     * @return array
     */
    public function getDefaultOptions()
    {
        return array(
            'encoding'       => 'UTF-8',
            'linkTitle'      => 'Reveal this e-mail address',
            'linkHiddenText' => '...',
            'popupWidth'     => 500,
            'popupHeight'    => 300,
        );
    }

    /**
     * Override the setPrivateKey method
     *
     * Override the parent method to store a binary representation of the private key as well.
     *
     * @param string $privateKey
     * @return Zend_Service_ReCaptcha_MailHide
     */
    public function setPrivateKey($privateKey)
    {
        parent::setPrivateKey($privateKey);

        /* Pack the private key into a binary string */
        $this->_privateKeyPacked = pack('H*', $this->_privateKey);

        return $this;
    }

    /**
     * Set the email property
     *
     * This method will set the email property along with the local and domain parts
     *
     * @param string $email
     * @return Zend_Service_ReCaptcha_MailHide
     */
    public function setEmail($email)
    {
        $this->_email = $email;

        $validator = $this->getEmailValidator();
        if (!$validator->isValid($email)) {
            require_once 'Zend/Service/ReCaptcha/MailHide/Exception.php';
            throw new Zend_Service_ReCaptcha_MailHide_Exception('Invalid email address provided');
        }

        $emailParts = explode('@', $email, 2);

        /* Decide on how much of the local part we want to reveal */
        if (strlen($emailParts[0]) <= 4) {
            $emailParts[0] = substr($emailParts[0], 0, 1);
        } else if (strlen($emailParts[0]) <= 6) {
            $emailParts[0] = substr($emailParts[0], 0, 3);
        } else {
            $emailParts[0] = substr($emailParts[0], 0, 4);
        }

        $this->_emailLocalPart = $emailParts[0];
        $this->_emailDomainPart = $emailParts[1];

        return $this;
    }

    /**
     * Get the email property
     *
     * @return string
     */
    public function getEmail()
    {
        return $this->_email;
    }

    /**
     * Get the local part of the email address
     *
     * @return string
     */
    public function getEmailLocalPart()
    {
        return $this->_emailLocalPart;
    }

    /**
     * Get the domain part of the email address
     *
     * @return string
     */
    public function getEmailDomainPart()
    {
        return $this->_emailDomainPart;
    }

    /**
     * Get the HTML code needed for the mail hide
     *
     * @param string $email
     * @return string
     * @throws Zend_Service_ReCaptcha_MailHide_Exception
     */
    public function getHtml($email = null)
    {
        if ($email !== null) {
            $this->setEmail($email);
        } elseif (null === ($email = $this->getEmail())) {
            /** @see Zend_Service_ReCaptcha_MailHide_Exception */
            require_once 'Zend/Service/ReCaptcha/MailHide/Exception.php';
            throw new Zend_Service_ReCaptcha_MailHide_Exception('Missing email address');
        }

        if ($this->_publicKey === null) {
            /** @see Zend_Service_ReCaptcha_MailHide_Exception */
            require_once 'Zend/Service/ReCaptcha/MailHide/Exception.php';
            throw new Zend_Service_ReCaptcha_MailHide_Exception('Missing public key');
        }

        if ($this->_privateKey === null) {
            /** @see Zend_Service_ReCaptcha_MailHide_Exception */
            require_once 'Zend/Service/ReCaptcha/MailHide/Exception.php';
            throw new Zend_Service_ReCaptcha_MailHide_Exception('Missing private key');
        }

        /* Generate the url */
        $url = $this->_getUrl();

        $enc = $this->getOption('encoding');

        /* Genrate the HTML used to represent the email address */
        $html = htmlentities($this->getEmailLocalPart(), ENT_COMPAT, $enc)
            . '_options['popupWidth']
                    . ',height='
                    . $this->_options['popupHeight']
                . '\'); return false;" title="'
                . $this->_options['linkTitle']
                . '">' . $this->_options['linkHiddenText'] . '@'
                . htmlentities($this->getEmailDomainPart(), ENT_COMPAT, $enc);

        return $html;
    }

    /**
     * Get the url used on the "hidden" part of the email address
     *
     * @return string
     */
    protected function _getUrl()
    {
        /* Figure out how much we need to pad the email */
        $numPad = self::ENCRYPTION_BLOCK_SIZE - (strlen($this->_email) % self::ENCRYPTION_BLOCK_SIZE);

        /* Pad the email */
        $emailPadded = str_pad($this->_email, strlen($this->_email) + $numPad, chr($numPad));

        /* Encrypt the email */
        $emailEncrypted = mcrypt_encrypt(self::ENCRYPTION_CIPHER, $this->_privateKeyPacked, $emailPadded, self::ENCRYPTION_MODE, self::ENCRYPTION_IV);

        /* Return the url */
        return self::MAILHIDE_SERVER . '?k=' . $this->_publicKey . '&c=' . strtr(base64_encode($emailEncrypted), '+/', '-_');
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * Zend_Service_ReCaptcha_Response
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Response.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Service_ReCaptcha_Response
{
    /**
     * Status
     *
     * true if the response is valid or false otherwise
     *
     * @var boolean
     */
    protected $_status = null;

    /**
     * Error code
     *
     * The error code if the status is false. The different error codes can be found in the
     * recaptcha API docs.
     *
     * @var string
     */
    protected $_errorCode = null;

    /**
     * Class constructor used to construct a response
     *
     * @param string $status
     * @param string $errorCode
     * @param Zend_Http_Response $httpResponse If this is set the content will override $status and $errorCode
     */
    public function __construct($status = null, $errorCode = null, Zend_Http_Response $httpResponse = null)
    {
        if ($status !== null) {
            $this->setStatus($status);
        }

        if ($errorCode !== null) {
            $this->setErrorCode($errorCode);
        }

        if ($httpResponse !== null) {
            $this->setFromHttpResponse($httpResponse);
        }
    }

    /**
     * Set the status
     *
     * @param string $status
     * @return Zend_Service_ReCaptcha_Response
     */
    public function setStatus($status)
    {
        if ($status === 'true') {
            $this->_status = true;
        } else {
            $this->_status = false;
        }

        return $this;
    }

    /**
     * Get the status
     *
     * @return boolean
     */
    public function getStatus()
    {
        return $this->_status;
    }

    /**
     * Alias for getStatus()
     *
     * @return boolean
     */
    public function isValid()
    {
        return $this->getStatus();
    }

    /**
     * Set the error code
     *
     * @param string $errorCode
     * @return Zend_Service_ReCaptcha_Response
     */
    public function setErrorCode($errorCode)
    {
        $this->_errorCode = $errorCode;

        return $this;
    }

    /**
     * Get the error code
     *
     * @return string
     */
    public function getErrorCode()
    {
        return $this->_errorCode;
    }

    /**
     * Populate this instance based on a Zend_Http_Response object
     *
     * @param Zend_Http_Response $response
     * @return Zend_Service_ReCaptcha_Response
     */
    public function setFromHttpResponse(Zend_Http_Response $response)
    {
        $body = $response->getBody();

        $parts = explode("\n", $body, 2);

        if (count($parts) !== 2) {
            $status = 'false';
            $errorCode = '';
        } else {
            list($status, $errorCode) = $parts;
        }

        $this->setStatus($status);
        $this->setErrorCode($errorCode);

        return $this;
    }
}


text:
<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

/** @see Zend_Service_ReCaptcha_Exception */
require_once 'Zend/Service/ReCaptcha/Exception.php';

/**
 * Zend_Service_ReCaptcha_MailHide_Exception
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage ReCaptcha
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Exception.php 23775 2011-03-01 17:25:24Z ralph $
 */
class Zend_Service_ReCaptcha_MailHide_Exception extends Zend_Service_ReCaptcha_Exception
{}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: WatchlistFilterSet.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @see Zend_Service_Simpy_WatchlistFilter
 */
require_once 'Zend/Service/Simpy/WatchlistFilter.php';

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Simpy_WatchlistFilterSet implements IteratorAggregate
{
    /**
     * List of filters in the set
     *
     * @var array of Zend_Service_Simpy_WatchlistFilter objects
     */
    protected $_filters = array();

    /**
     * Adds a filter to the set
     *
     * @param  Zend_Service_Simpy_WatchlistFilter $filter Filter to be added
     * @return void
     */
    public function add(Zend_Service_Simpy_WatchlistFilter $filter)
    {
        $this->_filters[] = $filter;
    }

    /**
     * Returns an iterator for the watchlist filter set
     *
     * @return ArrayIterator
     */
    public function getIterator()
    {
        return new ArrayIterator($this->_filters);
    }

    /**
     * Returns the number of filters in the set
     *
     * @return int
     */
    public function getLength()
    {
        return count($this->_filters);
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: WatchlistFilter.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Simpy_WatchlistFilter
{
    /**
     * Name of the filter
     *
     * @var string
     */
    protected $_name;

    /**
     * Query for the filter
     *
     * @var string
     */
    protected $_query;

    /**
     * Constructor to initialize the object with data
     *
     * @param  DOMNode $node Individual <filter> node from a parsed response from
     *                       a GetWatchlists or GetWatchlist operation
     * @return void
     */
    public function __construct($node)
    {
        $map =& $node->attributes;
        $this->_name = $map->getNamedItem('name')->nodeValue;
        $this->_query = $map->getNamedItem('query')->nodeValue;
    }

    /**
     * Returns the name of the filter
     *
     * @return string
     */
    public function getName()
    {
        return $this->_name;
    }

    /**
     * Returns the query for the filter
     *
     * @return string
     */
    public function getQuery()
    {
        return $this->_query;
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Note.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Simpy_Note
{
    /**
     * Private access type
     *
     * @var string
     */
    const ACCESSTYPE_PRIVATE = 'private';

    /**
     * Public access type
     *
     * @var string
     */
    const ACCESSTYPE_PUBLIC  = 'public';

    /**
     * Access type assigned to the note
     *
     * @var string
     */
    protected $_accessType;

    /**
     * ID of the note
     *
     * @var int
     */
    protected $_id;

    /**
     * URI of the note
     *
     * @var string
     */
    protected $_uri;

    /**
     * Date of the last modification made to the note
     *
     * @var string
     */
    protected $_modDate;

    /**
     * Date the note was added
     *
     * @var string
     */
    protected $_addDate;

    /**
     * Title of to the note
     *
     * @var string
     */
    protected $_title;

    /**
     * Tags assigned to the note
     *
     * @var array
     */
    protected $_tags;

    /**
     * Description of the note
     *
     * @var string
     */
    protected $_description;

    /**
     * Constructor to initialize the object with data
     *
     * @param  DOMNode $node Individual <link> node from a parsed response from
     *                       a GetLinks operation
     * @return void
     */
    public function __construct($node)
    {
        $this->_accessType = $node->attributes->getNamedItem('accessType')->nodeValue;

        $doc = new DOMDocument();
        $doc->appendChild($doc->importNode($node, true));
        $xpath = new DOMXPath($doc);

        $this->_uri = $xpath->evaluate('/note/uri')->item(0)->nodeValue;
        $this->_id = substr($this->_uri, strrpos($this->_uri, '=') + 1);
        $this->_modDate = trim($xpath->evaluate('/note/modDate')->item(0)->nodeValue);
        $this->_addDate = trim($xpath->evaluate('/note/addDate')->item(0)->nodeValue);
        $this->_title = $xpath->evaluate('/note/title')->item(0)->nodeValue;
        $this->_description = $xpath->evaluate('/note/description')->item(0)->nodeValue;

        $list = $xpath->query('/note/tags/tag');
        $this->_tags = array();

        for ($x = 0; $x < $list->length; $x++) {
            $this->_tags[$x] = $list->item($x)->nodeValue;
        }
    }

    /**
     * Returns the access type assigned to the note
     *
     * @see    ACCESSTYPE_PRIVATE
     * @see    ACCESSTYPE_PUBLIC
     * @return string
     */
    public function getAccessType()
    {
        return $this->_accessType;
    }

    /**
     * Returns the ID of the note
     *
     * @return int
     */
    public function getId()
    {
        return $this->_id;
    }

    /**
     * Returns the URI of the note
     *
     * @return string
     */
    public function getUri()
    {
        return $this->_uri;
    }

    /**
     * Returns the date of the last modification made to the note
     *
     * @return string
     */
    public function getModDate()
    {
        return $this->_modDate;
    }

    /**
     * Returns the date the note was added
     *
     * @return string
     */
    public function getAddDate()
    {
        return $this->_addDate;
    }

    /**
     * Returns the title assigned to the note
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->_title;
    }

    /**
     * Returns the tags assigned to the note
     *
     * @return array
     */
    public function getTags()
    {
        return $this->_tags;
    }

    /**
     * Returns the description assigned to the note
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->_description;
    }
}


text:
<?php

/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Link.php 23775 2011-03-01 17:25:24Z ralph $
 */

/**
 * @category   Zend
 * @package    Zend_Service
 * @subpackage Simpy
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_Simpy_Link
{
    /**
     * Private access type
     *
     * @var string
     */
    const ACCESSTYPE_PRIVATE = '0';

    /**
     * Public access type
     *
     * @var string
     */
    const ACCESSTYPE_PUBLIC  = '1';

    /**
     * Access type assigned to the link
     *
     * @var string
     */
    protected $_accessType;

    /**
     * URL of the link
     *
     * @var string
     */
    protected $_url;

    /**
     * Date of the last modification made to the link
     *
     * @var string
     */
    protected $_modDate;

    /**
     * Date the link was added
     *
     * @var string
     */
    protected $_addDate;

    /**
     * Title assigned to the link
     *
     * @var string
     */
    protected $_title;

    /**
     * Nickname assigned to the link
     *
     * @var string
     */
    protected $_nickname;

    /**
     * Tags assigned to the link
     *
     * @var array
     */
    protected $_tags;

    /**
     * Note assigned to the link
     *
     * @var string
     */
    protected $_note;

    /**
     * Constructor to initialize the object with data
     *
     * @param  DOMNode $node Individual <link> node from a parsed response from
     *                       a GetLinks operation
     * @return void
     */
    public function __construct($node)
    {
        $this->_accessType = $node->attributes->getNamedItem('accessType')->nodeValue;

        $doc = new DOMDocument();
        $doc->appendChild($doc->importNode($node, true));
        $xpath = new DOMXPath($doc);

        $this->_url = $xpath->evaluate('/link/url')->item(0)->nodeValue;
        $this->_modDate = $xpath->evaluate('/link/modDate')->item(0)->nodeValue;
        $this->_addDate = $xpath->evaluate('/link/addDate')->item(0)->nodeValue;
        $this->_title = $xpath->evaluate('/link/title')->item(0)->nodeValue;
        $this->_nickname = $xpath->evaluate('/link/nickname')->item(0)->nodeValue;
        $this->_note = $xpath->evaluate('/link/note')->item(0)->nodeValue;

        $list = $xpath->query('/link/tags/tag');
        $this->_tags = array();

        for ($x = 0; $x < $list->length; $x++) {
            $this->_tags[$x] = $list->item($x)->nodeValue;
        }
    }

    /**
     * Returns the access type assigned to the link
     *
     * @see ACCESSTYPE_PRIVATE
     * @see ACCESSTYPE_PUBLIC
     * @return string
     */
    public function getAccessType()
    {
        return $this->_accessType;
    }

    /**
     * Returns the URL of the link
     *
     * @return string
     */
    public function getUrl()
    {
        return $this->_url;
    }

    /**
     * Returns the date of the last modification made to the link
     *
     * @return string
     */
    public function getModDate()
    {
        return $this->_modDate;
    }

    /**
     * Returns the date the link was added
     *
     * @return string
     */
    public function getAddDate()
    {
        return $this->_addDate;
    }

    /**
     * Returns the title assigned to the link
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->_title;
    }

    /**
     * Returns the nickname assigned to the link
     *
     * @return string
     */
    public function getNickname()
    {
        return $this->_nickname;
    }

    /**
     * Returns the tags assigned to the link
     *
     * @return array
     */
    public function getTags()
    {
        return $this->_tags;
    }

    /**
     * Returns the note assigned to the link
     *
     * @return string
     */
    public function getNote()
    {
        return $this->_note;
    }
}