Get HTMLPurifier config.

@param array|string $data HTMLPurifier configuration.

@return \HTMLPurifier_Config Configuration object.
186349
protected function getConfig($data = []) {
		// HTMLPurifier configuration
		$config = HTMLPurifier_Config::createDefault();
		$config->autofinalize = false;

		// Set default settings, 'default' key must exist
		if (empty($data)) {
			$data = 'default';
		}

		// If string given, get the config array
		if (is_string($data)) {
			$data = config(sprintf(
				'parsedownextra.purifier.settings.%s',
				$data
			));
		}

		// Merge both global and default settings
		$data = array_replace_recursive(
			(array) config('parsedownextra.purifier.settings.global'),
			(array) $data
		);

		// At this point $data should be an array
		if (is_array($data)) {
			$config->loadArray($data);
		}

		return $config;
	}
970350
public function image($data)
    {
        $value = isset($data['src']) ? $data['src'] : null;
        $url   = isset($data['url']) ? $data['url'] : null;
        if (!$value) {
            return null;
        }
        
        $params = $url ? ['url' => Ioc::url($url)] : null;
        return HtmlHelper::image($value, $params);
    }
390347
public function htmlDecode($data)
    {
        switch (gettype($data)) {
            case 'array':
                foreach ($data as $key => $value) {
                    $data[$key] = $this->htmlDecode($value);
                }

                break;
            case 'object':
                $data = clone $data;

                foreach ($data as $key => $value) {
                    $data->$key = $this->htmlDecode($value);
                }

                break;
            case 'string':
            default:
                $data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');

                break;
        }

        return $data;
    }
692308
public static function config_get_configuration_array($data) {
        $lines = explode("\n", $data->servers);
        $servers = array();
        foreach ($lines as $line) {
            // Trim surrounding colons and default whitespace.
            $line = trim(trim($line), ":");
            // Skip blank lines.
            if ($line === '') {
                continue;
            }
            $servers[] = explode(':', $line, 3);
        }

        $clustered = false;
        $setservers = array();
        if (isset($data->clustered)) {
            $clustered = true;

            $lines = explode("\n", $data->setservers);
            foreach ($lines as $line) {
                // Trim surrounding colons and default whitespace.
                $line = trim(trim($line), ":");
                if ($line === '') {
                    continue;
                }
                $setserver = explode(':', $line, 3);
                // We don't use weights, so display a debug message.
                if (count($setserver) > 2) {
                    debugging('Memcached Set Server '.$setserver[0].' has too many parameters.');
                }
                $setservers[] = $setserver;
            }
        }

        $isshared = false;
        if (isset($data->isshared)) {
            $isshared = $data->isshared;
        }

        return array(
            'servers' => $servers,
            'compression' => $data->compression,
            'serialiser' => $data->serialiser,
            'prefix' => $data->prefix,
            'hash' => $data->hash,
            'bufferwrites' => $data->bufferwrites,
            'clustered' => $clustered,
            'setservers' => $setservers,
            'isshared' => $isshared
        );
    }
687728
public static function getColumnsConfiguration(array $data)
	{
		$config = array();
		$lastColumns = null;

		foreach (array('large', 'medium', 'small') as $media) {

			$columns = isset($data['rs_columns_' . $media])
				? $data['rs_columns_' . $media]
				: null;
			if (!$columns) {
				$columns = $lastColumns ?: '2';
			}
			$lastColumns = $columns;

			$columns = array_map(function($value) {
				return (int)$value ?: 1;
			}, explode('-', $columns));

			if (count($columns) === 1 && $columns[0] > 1) {
				$columns = array_fill(0, (int)$columns[0], '1');
			}

			$columnsTotal = array_reduce($columns, function($a, $b) {
				return $a + $b;
			});
			$classes = array();
			foreach ($columns as $key => $column) {
				$classes[] = array('-' . $media . '-col-' . $columnsTotal . '-' . $column);
			}
			$classes[0][] = '-' . $media . '-first';
			$classes[count($classes) - 1][] = '-' . $media . '-last';
			$config[$media] = $classes;

		}

		return $config;
	}
760115
public function get($name)
    {
        if ($this->has($name)) {
            return $this->data[$name];
        }
        // possible performance bottleneck, convert to iterative if necessary
        if ($this->parent) {
            return $this->parent->get($name);
        }
        throw new HTMLPurifier_Exception("Key '$name' not found");
    }
433012
protected static function getUrlSafeData($data)
    {
        $remainder = strlen($data) % 4;

        if ($remainder) {
            $data .= str_repeat('=', 4 - $remainder);
        }

        return strtr($data, '-_', '+/');
    }
519597
public function decode($data)
    {
        $parser = new Parser();
        $this->arrayData = (array) $parser->parse($data);
        return $this->arrayData;
    }
240747
public function encrypt(string $data): string
    {
        $this->clearErrors();

        $isAddIvToOutput = false;
        $vector          = $this->getIV();
        if (empty($vector) === true) {
            $vector          = $this->generateIV();
            $isAddIvToOutput = true;
        }

        if ($this->isUseAuthentication() === true) {
            $encrypted = $this->openSslEncryptAuthenticated(
                $data,
                $this->getMethod(),
                $this->getPassword(),
                $this->getOptions(),
                $vector,
                $this->getAdditionalAuthenticationData(),
                $tag,
                $this->getTagLength()
            );

            // Tag/Message authentication code should be sent with the encrypted message
            // otherwise it won't be possible to validate and encrypt the message.
            // Though https://tools.ietf.org/html/rfc5084 do not directly says it should
            // be passed along with the encrypted message adding it is one of the possible
            // solutions.
            $encrypted = $tag . $encrypted;
        } else {
            $encrypted = $this->openSslEncrypt(
                $data,
                $this->getMethod(),
                $this->getPassword(),
                $this->getOptions(),
                $vector
            );
        }

        // Add initialization vector (IV) if it was generated otherwise it won't be possible to encrypt the message.
        //
        // Also @see http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf
        //
        // Appendix C: Generation of Initialization Vectors
        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        // ...
        // The IV need not be secret, so the IV, or information sufficient to determine the IV, may be
        // transmitted with the ciphertext.
        // ...
        $result = $isAddIvToOutput === false ? $encrypted : $vector . $encrypted;

        return $result;
    }
1126794
public static function instance($prototype = null)
    {
        if ($prototype !== null) {
            HTMLPurifier_ConfigSchema::$singleton = $prototype;
        } elseif (HTMLPurifier_ConfigSchema::$singleton === null || $prototype === true) {
            HTMLPurifier_ConfigSchema::$singleton = HTMLPurifier_ConfigSchema::makeFromSerial();
        }
        return HTMLPurifier_ConfigSchema::$singleton;
    }
821115
public function get_foreach_const($data)
    {
        $Config =[];
        foreach($data as $key=>$value){
            $reflect = new \ReflectionClass('pizepei\config\\'.$value);
            $Config = array_merge_recursive($Config, $reflect->getConstants());
        }
        return $Config;
    }
786215
public function strip_php_tags($data)
    {
        if (is_array($data)) {
            foreach ($data as $key=>$value) {
                $data[$key] = $this->strip_php_tags($value);
            }
            return $data;
        }
        return addslashes(htmlspecialchars(strip_tags($data)));
    }
1352219
public function encodeArray($data) {
        $d = array();
        foreach ($data as $key => $value) {
            if (is_string($key))
                $key = htmlspecialchars($key);
            if (is_string($value))
                $value = htmlspecialchars($value);
            elseif (is_array($value))
                $value = self::encodeArray($value);
            $d[$key] = $value;
        }
        return $d;
    }
1130624
public function htmlEncode($data)
    {
        switch (gettype($data)) {
            case 'array':
                foreach ($data as $key => $value) {
                    $data[$key] = $this->htmlEncode($value);
                }

                break;
            case 'object':
                $data = clone $data;

                foreach ($data as $key => $value) {
                    $data->$key = $this->htmlEncode($value);
                }

                break;
            case 'string':
            default:
                $data = htmlentities($data, ENT_QUOTES, 'UTF-8');

                break;
        }

        return $data;
    }
1094841
public static function getGlobalConfiguratorsFromData(array $data): array
    {
        assert(array_key_exists(self::KEY_GLOBAL_CONTAINER_CONFIGURATORS, $data));
        $result = $data[self::KEY_GLOBAL_CONTAINER_CONFIGURATORS];

        return $result;
    }
489922
public function config($data)
    {
        $items = is_array($data) ? $data : array();

        $config = new Provider\Configuration($items);

        if (is_string($data))
        {
            $config->load($data);
        }

        $interface = ProviderInterface::CONFIG;

        return $this->set($interface, $config);
    }
228503
public function CreateReturnHtml($data){
		PhpWsdl::Debug('CreateReturnHtml for '.$data['method']->Return->Name);
		$res=&$data['res'];
		$m=&$data['method'];
		$res[]='<p>Return value <span class="pre">';
		$o=sizeof($res)-1;
		$type=$m->Return->Type;
		if(in_array($type,PhpWsdl::$BasicTypes)){
			$res[$o].='<span class="blue">'.$type.'</span>';
		}else{
			$res[$o].='<a href="#'.$type.'"><span class="lightBlue">'.$type.'</span></a>';
		}
		$res[$o].='</span>'.((!is_null($m->Return->Docs))?': '.nl2br(htmlentities($m->Return->Docs)):'').'</p>';
		PhpWsdl::CallHook(
			'CreateReturnHtmlHook',
			$data
		);
	}