3 * File containing the ezcMailPop3TransportOptions class
7 * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
8 * @license http://ez.no/licenses/new_bsd New BSD License
12 * Class containing the options for POP3 transport.
14 * The options from {@link ezcMailTransportOptions} are inherited.
16 * Example of how to use POP3 transport options:
18 * $options = new ezcMailPop3TransportOptions();
19 * $options->ssl = true;
20 * $options->timeout = 3;
21 * $options->authenticationMethod = ezcMailPop3Transport::AUTH_APOP;
23 * $pop3 = new ezcMailPop3Transport( 'pop3.example.com', null, $options );
26 * @property int $authenticationMethod
27 * Specifies the method to connect to the POP3 transport. The methods
28 * supported are {@link ezcMailPop3Transport::AUTH_PLAIN_TEXT} and
29 * {@link ezcMailPop3Transport::AUTH_APOP}.
34 class ezcMailPop3TransportOptions
extends ezcMailTransportOptions
37 * Constructs an object with the specified values.
39 * @throws ezcBasePropertyNotFoundException
40 * if $options contains a property not defined
41 * @throws ezcBaseValueException
42 * if $options contains a property with a value not allowed
43 * @param array(string=>mixed) $options
45 public function __construct( array $options = array() )
47 // default authentication method is PLAIN
48 $this->authenticationMethod
= ezcMailPop3Transport
::AUTH_PLAIN_TEXT
;
50 parent
::__construct( $options );
54 * Sets the option $name to $value.
56 * @throws ezcBasePropertyNotFoundException
57 * if the property $name is not defined
58 * @throws ezcBaseValueException
59 * if $value is not correct for the property $name
64 public function __set( $name, $value )
68 case 'authenticationMethod':
69 if ( !is_numeric( $value ) )
71 throw new ezcBaseValueException( $name, $value, 'int' );
73 $this->properties
[$name] = (int) $value;
77 parent
::__set( $name, $value );