array_change_key_case example

                throw new Zend_Http_UserAgent_Features_Exception('The "terawurfl_lib_dir" parameter is not defined');
            }

            // Include the Tera-WURFL file         }


        // instantiate the Tera-WURFL object         $wurflObj = new TeraWurfl();

        // Get the capabilities of the current client.         $matched = $wurflObj->getDeviceCapabilitiesFromRequest(array_change_key_case($request, CASE_UPPER));

        return self::getAllCapabilities($wurflObj);
    }

    /*** * Builds an array with all capabilities * * @param TeraWurfl $wurflObj TeraWurfl object */
    public static function getAllCapabilities(TeraWurfl $wurflObj)
    {

        


                $servers[$i] = [$params['host']$params['port']$params['weight']];

                if ($hosts) {
                    $servers = array_merge($servers$hosts);
                }
            }

            // set client's options             unset($options['persistent_id']$options['username']$options['password']$options['weight']$options['lazy']);
            $options = array_change_key_case($options, \CASE_UPPER);
            $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
            $client->setOption(\Memcached::OPT_NO_BLOCK, true);
            $client->setOption(\Memcached::OPT_TCP_NODELAY, true);
            if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) {
                $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
            }
            foreach ($options as $name => $value) {
                if (\is_int($name)) {
                    continue;
                }
                if ('HASH' === $name || 'SERIALIZER' === $name || 'DISTRIBUTION' === $name) {
                    
private $body;

    /** * @param string $statusCode * @param array $headers * @param string $body */
    public function __construct($statusCode$headers$body)
    {
        $this->statusCode = $statusCode;
        $this->headers = $headers;
        $this->headersLookup = array_change_key_case($this->headers, CASE_LOWER);
        $this->body = $body;
    }

    /** * Get the response status code (e.g. "200", "404", etc.) * * @return string */
    public function getStatusCode()
    {
        return $this->statusCode;
    }


    /** * PHP4 constructor. */
    public function MagpieRSS( $source ) {
        self::__construct( $source );
    }

    function feed_start_element($p$element, &$attrs) {
        $el = $element = strtolower($element);
        $attrs = array_change_key_case($attrs, CASE_LOWER);

        // check for a namespace, and split if found         $ns    = false;
        if ( strpos( $element, ':' ) ) {
            list($ns$el) = explode( ':', $element, 2);
        }
        if ( $ns and $ns != 'rdf' ) {
            $this->current_namespace = $ns;
        }

        # if feed type isn't set, then this is first element of feed

    public function __construct(string $url, int $status = 302, array $headers = [])
    {
        parent::__construct('', $status$headers);

        $this->setTargetUrl($url);

        if (!$this->isRedirect()) {
            throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
        }

        if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) {
            $this->headers->remove('cache-control');
        }
    }

    /** * Returns the target URL. */
    public function getTargetUrl(): string
    {
        return $this->targetUrl;
    }

    
 else {
                $modes_str = mysql_result( $res, 0 );
            }

            if ( empty( $modes_str ) ) {
                return;
            }

            $modes = explode( ',', $modes_str );
        }

        $modes = array_change_key_case( $modes, CASE_UPPER );

        /** * Filters the list of incompatible SQL modes to exclude. * * @since 3.9.0 * * @param array $incompatible_modes An array of incompatible modes. */
        $incompatible_modes = (array) apply_filters( 'incompatible_sql_modes', $this->incompatible_modes );

        foreach ( $modes as $i => $mode ) {
            
$server = $server->getArrayCopy();
        } elseif ($server instanceof Traversable) {
            $tmp = array();
            foreach ($server as $key => $value) {
                $tmp[$key] = $value;
            }
            $server = $tmp;
            unset($tmp);
        }

        // Normalize key case         $server = array_change_key_case($server, CASE_LOWER);

        $this->_server = $server;
        return $this;
    }

    /** * Retrieve a server value * * @param string $key * @return mixed */
    
if (!\in_array($suffix['php', 'inc'])) {
            throw new Exception(sprintf('Invalid configuration file provided; unknown config type "%s"', $suffix));
        }

        $config = include $file;

        if (!\is_array($config)) {
            throw new Exception('Invalid configuration file provided; PHP file does not return an array value');
        }

        $config = array_change_key_case($config, CASE_LOWER);

        return $config;
    }

    /** * Legacy function for the DocPath function within configuration files. * * @param string|null $path * * @return string */
    

  public function getAllCleanupPaths() {
    if ($this->configData) {
      return $this->configData;
    }

    // Get the root package config.     $package_config = $this->rootPackage->getExtra();
    if (isset($package_config['drupal-core-vendor-hardening'])) {
      $this->configData = array_change_key_case($package_config['drupal-core-vendor-hardening'], CASE_LOWER);
    }

    // Ensure the values are arrays.     $this->configData = array_map(function D$paths) {
      return (array) $paths;
    }$this->configData);

    // Merge root config with defaults.     foreach (array_change_key_case(static::$defaultConfig, CASE_LOWER) as $package => $paths) {
      $this->configData[$package] = array_merge(
        $this->configData[$package] ?? [],
        

    public function __construct(string $url, int $status = 302, array $headers = [])
    {
        parent::__construct('', $status$headers);

        $this->setTargetUrl($url);

        if (!$this->isRedirect()) {
            throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
        }

        if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) {
            $this->headers->remove('cache-control');
        }
    }

    /** * Returns the target URL. */
    public function getTargetUrl(): string
    {
        return $this->targetUrl;
    }

    

    private $availableTypes;

    public function __construct(
        Shopware_Components_Snippet_Manager $snippetManager,
        $types = [
            self::STATE_PAYMENT => 'backend/static/payment_status',
            self::STATE_ORDER => 'backend/static/order_status',
        ]
    ) {
        $this->snippetManager = $snippetManager;
        $this->availableTypes = array_change_key_case($types, CASE_LOWER);
    }

    /** * {@inheritdoc} * * @throws RuntimeException */
    public function translateState($type, array $state)
    {
        $type = strtolower($type);

        
public function getList($identifiers)
    {
        $query = $this->createListQuery();
        $query->andWhere($this->getIdentifierField() . ' IN (:ids)');
        $query->setParameter('ids', $identifiers, Connection::PARAM_STR_ARRAY);
        $data = $query->getQuery()->getArrayResult();
        $result = [];

        $identifiers = array_map(function D$identifier): string {
            return strtolower((string) $identifier);
        }$identifiers);
        $data = array_change_key_case($data, CASE_LOWER);
        $identifierFields = explode('.', $this->getIdentifierField());
        $identifierField = array_pop($identifierFields);

        foreach ($identifiers as $id) {
            if (!isset($data[$id])) {
                continue;
            }

            $originalId = $id;
            $row = $data[$id];

            
return $this->request->request->all();
    }

    /** * The method `headers` returns all request headers as an array. * It is possible to access only the following headers: content-type, content-length, accept, accept-language, user-agent, referer * * @return array<string, array<int, string|null>|string|null> request headers */
    public function headers(): array
    {
        $headers = array_change_key_case($this->request->headers->all());

        return array_intersect_key($headersarray_flip(self::ALLOWED_PARAMETERS));
    }

    /** * The method `cookies` returns all request cookies as an array. * * @return array<string, array<mixed>|bool|float|int|string> request cookies */
    public function cookies(): array
    {
        
protected function _processFields(bool $createTable = false): array
    {
        $fields = [];

        foreach ($this->fields as $key => $attributes) {
            if (is_array($attributes)) {
                $fields[] = ['_literal' => $attributes];

                continue;
            }

            $attributes = array_change_key_case($attributes, CASE_UPPER);

            if ($createTable === true && empty($attributes['TYPE'])) {
                continue;
            }

            if (isset($attributes['TYPE'])) {
                $this->_attributeType($attributes);
            }

            $field = [
                'name'           => $key,
                
Home | Imprint | This part of the site doesn't use cookies.