[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of the Symfony package. 5 * 6 * (c) Fabien Potencier <[email protected]> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12 namespace Symfony\Component\Ldap\Adapter; 13 14 use Symfony\Component\OptionsResolver\Options; 15 use Symfony\Component\OptionsResolver\OptionsResolver; 16 17 /** 18 * @author Charles Sarrazin <[email protected]> 19 */ 20 abstract class AbstractQuery implements QueryInterface 21 { 22 protected $connection; 23 protected $dn; 24 protected $query; 25 protected $options; 26 27 public function __construct(ConnectionInterface $connection, string $dn, string $query, array $options = []) 28 { 29 $resolver = new OptionsResolver(); 30 $resolver->setDefaults([ 31 'filter' => '*', 32 'maxItems' => 0, 33 'sizeLimit' => 0, 34 'timeout' => 0, 35 'deref' => static::DEREF_NEVER, 36 'attrsOnly' => 0, 37 'scope' => static::SCOPE_SUB, 38 'pageSize' => 0, 39 ]); 40 $resolver->setAllowedValues('deref', [static::DEREF_ALWAYS, static::DEREF_NEVER, static::DEREF_FINDING, static::DEREF_SEARCHING]); 41 $resolver->setAllowedValues('scope', [static::SCOPE_BASE, static::SCOPE_ONE, static::SCOPE_SUB]); 42 43 $resolver->setNormalizer('filter', function (Options $options, $value) { 44 return \is_array($value) ? $value : [$value]; 45 }); 46 47 $this->connection = $connection; 48 $this->dn = $dn; 49 $this->query = $query; 50 $this->options = $resolver->resolve($options); 51 } 52 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |