equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Ldap |
16 * @package Zend_Ldap |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Attribute.php 22996 2010-09-22 17:01:46Z sgehrig $ |
19 * @version $Id: Attribute.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Ldap_Converter |
23 * @see Zend_Ldap_Converter |
24 */ |
24 */ |
27 /** |
27 /** |
28 * Zend_Ldap_Attribute is a collection of LDAP attribute related functions. |
28 * Zend_Ldap_Attribute is a collection of LDAP attribute related functions. |
29 * |
29 * |
30 * @category Zend |
30 * @category Zend |
31 * @package Zend_Ldap |
31 * @package Zend_Ldap |
32 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
33 * @license http://framework.zend.com/license/new-bsd New BSD License |
34 */ |
34 */ |
35 class Zend_Ldap_Attribute |
35 class Zend_Ldap_Attribute |
36 { |
36 { |
37 const PASSWORD_HASH_MD5 = 'md5'; |
37 const PASSWORD_HASH_MD5 = 'md5'; |
212 } |
212 } |
213 |
213 |
214 /** |
214 /** |
215 * Converts a PHP data type into its LDAP representation |
215 * Converts a PHP data type into its LDAP representation |
216 * |
216 * |
217 * @deprected use Zend_Ldap_Converter instead |
217 * @deprected use Zend_Ldap_Converter instead |
218 * @param mixed $value |
218 * @param mixed $value |
219 * @return string|null - null if the PHP data type cannot be converted. |
219 * @return string|null - null if the PHP data type cannot be converted. |
220 */ |
220 */ |
221 public static function convertToLdapValue($value) |
221 public static function convertToLdapValue($value) |
222 { |
222 { |
223 return self::_valueToLdap($value); |
223 return self::_valueToLdap($value); |
224 } |
224 } |
225 |
225 |
226 /** |
226 /** |
227 * Converts an LDAP value into its PHP data type |
227 * Converts an LDAP value into its PHP data type |
228 * |
228 * |
229 * @deprected use Zend_Ldap_Converter instead |
229 * @deprected use Zend_Ldap_Converter instead |
230 * @param string $value |
230 * @param string $value |
231 * @return mixed |
231 * @return mixed |
232 */ |
232 */ |
233 public static function convertFromLdapValue($value) |
233 public static function convertFromLdapValue($value) |
234 { |
234 { |
235 return self::_valueFromLdap($value); |
235 return self::_valueFromLdap($value); |
236 } |
236 } |
390 $newVal = self::_valueFromLdapDateTime($values[$i]); |
390 $newVal = self::_valueFromLdapDateTime($values[$i]); |
391 if ($newVal !== null) $values[$i] = $newVal; |
391 if ($newVal !== null) $values[$i] = $newVal; |
392 } |
392 } |
393 } |
393 } |
394 else { |
394 else { |
395 $newVal = self::_valueFromLdapDateTime($values); |
395 $newVal = self::_valueFromLdapDateTime($values); |
396 if ($newVal !== null) $values = $newVal; |
396 if ($newVal !== null) $values = $newVal; |
397 } |
397 } |
398 return $values; |
398 return $values; |
399 } |
399 } |
400 |
400 |
401 /** |
401 /** |
402 * @param string|DateTime $value |
402 * @param string|DateTime $value |