Parse the special param.

@param  string $param
@return void
427841
protected function parseParam($param)
    {
        $method = 'parse'.ucfirst($param);

        if (method_exists($this, $method)) {
            if ($params = $this->input($param)) {
                return $this->$method($params);
            }
        }
    }
280695
protected function getParam($param)
    {
        $params = $this->getParams();
        if (! isset($params[$param])) {
            return false;
        }
        return $params[$param];
    }
108035
public function setParam($param, $value = null)
    {
        if (is_string($param)) {
            $this->_params[$param] = $value;

            return $this;
        }

        if (is_array($param)) {
            foreach ($param as $key => $value) {
                $this->_params[$key] = $value;
            }
        }

        return $this;
    }
524353
private static function formatParameter($param): string
	{
		if (is_int($param) || is_float($param)) {
			return (string) $param;

		} elseif (is_string($param)) {
			return "'" . addslashes($param) . "'";

		} elseif (is_null($param)) {
			return "NULL";

		} elseif (is_bool($param)) {
			return $param ? "TRUE" : "FALSE";

		} elseif (is_array($param)) {
			$formatted = [];
			foreach ($param as $value) {
				$formatted[] = self::formatParameter($value);
			}
			return implode(', ', $formatted);

		} elseif ($param instanceof \Datetime) {
			return "'" . $param->format('Y-m-d H:i:s') . "'";

		} elseif (is_object($param)) {
			return get_class($param) . (method_exists($param, 'getId') ? '(' . $param->getId() . ')' : '');

		} else {
			return @"'$param'"; // @ - conversion of something to string
		}
	}
699807
public function init($param)
    {

        if (empty($param)) return false;

        $this->header = '';

        $param_list = new ParamList();
        foreach ($param as $key => $value) {
            if (property_exists($this, $key)) $this->$key = $value;
            elseif (property_exists($param_list, strtolower(str_replace('-', '_', $key)))) {
                if (is_string($value)) {
                    $this->header[] = new SingleParam($key, $value);
                } elseif (is_array($value)) {
                    $this->header[] = new MultiParam($key, $value);
                }
            }

        }


        return true;
    }
409714
public function load($param = null)
    {
        try {
            if (empty($param['file'])) {
                throw new ConfigException(_('No config file was give please, the parameter '), 0, 1, __METHOD__, __LINE__);
            }
            $this->configFile = (string)$param['file'];

            if (isset($param['process-sections'])) {
                $this->processSections = (bool)$param['process-sections'];
            }
            if (isset($param['scanner-mode'])) {
                $this->scannerMode = (int)$param['scanner-mode'];
            }

            $data = parse_ini_file($this->configFile, $this->processSections, $this->scannerMode);

            $this->mainNode = new Node(null, IConfig::MAIN_NODE_KEY, 'main node');
            foreach ($data as $key => $group) {
                if (!is_array($group)) {
                    $newNode = new Node($this->mainNode, $key, $group);
                    $this->mainNode->addChild($newNode);
                    continue;
                }

                $newNode = new Node($this->mainNode, $key, $key);

                foreach ($group as $name => $value) {
                    $childNode = new Node($newNode, $name, $value);
                    $newNode->addChild($childNode);
                }
                $this->mainNode->addChild($newNode);
            }
        } catch (ConfigException $e) {
            throw $e;
        }
    }
45410
protected static function compileInclude($param)
    {
        $result = '<<<<{include} error!!!>>>>';
        $parameters = self::parseParameters($param);
        if (isset($parameters['file'])) {
            if ('$' != $parameters['file']{0})
                $parameters['file'] = '\'' . $parameters['file'] . '\'';
            $result = "<?php \$this->display({$parameters['file']});?>";
        }

        return $result;
    }
332567
protected function injectVars($param)
    {
        if (!is_string($param) || !preg_match_all('/\{([^\}\{]+)\}/', $param, $matches)) {
            return $this->getCorrectType($param);
        }

        foreach ($matches[1] as $index => $match) {
            $key = $this->prepareVarName($match);

            if (!isset($this->vars[$key])) {
                continue;
            }

            $param = str_replace(sprintf('{%s}', $match), $this->vars[$key], $param);
        }

        return $this->getCorrectType($param);
    }
957219
public static function prepareParams(array $param){

        $fillable = static::getInstance()->getFillables();

        foreach($param as $key => $value){
            if(!in_array($key, $fillable)){
                unset($param[$key]);
            } elseif(!$value){
                unset($param[$key]);
            }
        }

        return $param;
    }
59770
public function get_parameters($param=null)
    {
        $params = $this->params;
        $params['MAILBOX'] = $this->mailbox;
        $params['ORDER']   = $this->order;

        if ($param !== null) {
            return $params[$param];
        }

        return $params;
    }
307275
public static function configure($param = array('key' => null, 'secret' => null))
    {

        if (!$param['key'] && !$param['secret']) {
            Throw new \Exception('Api Key and Secret must be defined');
        }

        self::$API_SECRET = $param['secret'];
        self::$API_KEY = $param['key'];
    }
345861
public function addParam(\Deflection\Element\Param $param)
    {
        $element = $param->getElement();
        $this->params = array_merge($this->params, array(''), $element);
        return $this;
    }
830669
public function bind(array $param) {
		$ref    = new \ReflectionClass('mysqli_stmt');
		$method = $ref->getMethod("bind_param");
		$method->invokeArgs($this->result, $param);
	}
1325806
private function process_parameters($param){
    foreach ($param as $key => $val){
      //$val is an array
      if (\is_array($val)){
        $param[$key] = $this->process_parameters($val);
      }
      else {
        $param[$key] = $this->sanitize($val);
      }
    }
    //Return the processed parameters
    return $param;
  }
434180
public static function paramFilter($param) {
        if (empty($param)) {
            $param = '';
        }

        if (is_array($param)) {
            foreach ($param as $key => $value) {
                $param[$key] = String::urlSafetyFilter($value);
            }
        }

        if (is_string($param)) {
            $param = String::urlSafetyFilter($param);
        }

        return $param;
    }
494894
private function GetParamString($param)
    {
        if ($param === null)
            return "null";
        if (is_string($param))
            return "'" .  addcslashes($param, "'") . "'";
        
        else if (is_bool($param))
            return $param ? "true" : "false";
        
        else if (is_int($param) || is_float($param))
            return (string)$param;
        
        else if ($param instanceof WritableClass)
            return $param->GetNewStatement();
        
        else if (is_array($param))
        {
            $resultArr = array();
            foreach ($param as $key=>$val)
            {
                $resultArr[] = $this->GetParamString($key) . '=>' . $this->GetParamString($val);
            }
            return 'array(' . join (', ' , $resultArr) .')';
        }
        else if ($param instanceof \Phine\Framework\System\Enum)
        {
            $value = $param->Value();
            $class = get_class($param);
            return "\\$class::ByValue('$value')";
        }
        throw new \InvalidArgumentException('A writable class must have primitive types, Enums, arrays and PhpWritable classes as construct params only.');
    }
127387
protected static function getValue($param)
    {
        $data = explode(':', $param);

        $result = ['rule' => trim($data[0])];

        $result['value'] = count($data) > 1 ? $data[1] : null;

        return $result;
    }