Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Ldap / Filter / MaskFilter.php
blob844149b3f233fa50611bdc77e98286e471efd490
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Ldap\Filter;
12 /**
13 * Zend\Ldap\Filter\MaskFilter provides a simple string filter to be used with a mask.
15 class MaskFilter extends StringFilter
17 /**
18 * Creates a Zend\Ldap\Filter\MaskFilter.
20 * @param string $mask
21 * @param string $value,...
23 public function __construct($mask, $value)
25 $args = func_get_args();
26 array_shift($args);
27 for ($i = 0; $i < count($args); $i++) {
28 $args[$i] = static::escapeValue($args[$i]);
30 $filter = vsprintf($mask, $args);
31 parent::__construct($filter);
34 /**
35 * Returns a string representation of the filter.
37 * @return string
39 public function toString()
41 return $this->filter;