Add function to structure

@param \Deflection\Element\Param $param Param

@return \Deflection\Element\Classes
345861
public function addParam(\Deflection\Element\Param $param)
    {
        $element = $param->getElement();
        $this->params = array_merge($this->params, array(''), $element);
        return $this;
    }
1288821
public function addArray(array $param = null)
    {
        $this->param = array_merge($this->param, $param);

        return $this;
    }
1230667
public function param($param, $value, $type = null)
    {
        return $this->setParameter($param, $value, $type);
    }
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;
    }
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);
    }
1166595
public function exec($param)
    {
        $flowInterrupt = $this->interrupt($param);
        if ($flowInterrupt === null) {
            // do nothing, let the flow proceed
            return;
        }

        if ($flowInterrupt instanceof  InterrupterInterface) {
            $flowInterruptType = $flowInterrupt->getType();
        } elseif ($flowInterrupt) {
            $flowInterruptType = InterrupterInterface::TYPE_CONTINUE;
            $flowInterrupt     = null;
        } else {
            $flowInterruptType = InterrupterInterface::TYPE_BREAK;
            $flowInterrupt     = null;
        }

        /* @var null|InterrupterInterface $flowInterrupt */
        $this->carrier->interruptFlow($flowInterruptType, $flowInterrupt);
    }
983318
protected function _buildDataAttrs(array $param = array())
    {
        $return = '';
        foreach ($param as $data => $val) {
            $dKey = 'data-' . trim($data);

            if (is_object($val)) {
                $val = (array) $val;
            }

            if (is_array($val)) {
                $val = str_replace('"', '\'', json_encode($val));
                $return .= $this->_buildAttr($dKey, $val);
                continue;
            }

            $return .= $this->_buildAttr($dKey, $val);
        }

        return $return;
    }
865054
public function actionParse($param)
    {
        $model = new ParseForm();
        $model->kadastr = $param;
        $data = $model->parse();

        echo $this->render('parse',['data'=>$data]);
    }
214809
public function call($params = null)
    {
        $method = $this->method;

        if (!empty($this->constructor_arguments)) {
            $instance = new $this->class($this->constructor_arguments);
        } else {
            $instance = new $this->class();
        }
        if (!is_null($params)) {
            return $instance->$method($params);
        }
        return $instance->$method();
    }
358863
function buildFunctionParams( &$params )
    {
        foreach( array_keys( $params ) as $paramKey )
        {
            if( $this->isFunctionParam( $params[$paramKey] ) )
            {
                $params[$paramKey] = $this->execFunction( $params[$paramKey] );
            }
            else if( is_array( $params[$paramKey] ) )
            {
                $this->buildFunctionParams( $params[$paramKey] );
            }
        }
    }
351316
public static function setParams(&$param)
    {
        $arr_req = array();
        foreach($param as $key=>$value){
            if(is_array($value)) {
                $arr_req[] = "${key}=".implode("&",$value);
            } else {
                if ($value == '') {
                    continue;
                }
                $arr_req[] = "${key}=${value}";
            }
        }
        $str = implode("&",$arr_req);

        return $str;
    }
865288
private function getReflectionParamData(\ReflectionParameter $param)
    {
        $param_type = self::getPsalmTypeFromReflectionType($param->getType());
        $param_name = (string)$param->getName();

        $is_optional = (bool)$param->isOptional();

        return new FunctionLikeParameter(
            $param_name,
            (bool)$param->isPassedByReference(),
            $param_type,
            null,
            null,
            $is_optional,
            $param_type->isNullable(),
            $param->isVariadic()
        );
    }
652022
public function call($param = null)
    {
        // get the class within the correct namespace
        // initiate object
        $object = $this->prepareObject(new $this->class());

        $return    = new \SplFixedArray(2);
        $return[1] = $object;

        if (!empty($this->method)) {
            if (!empty($param) && !empty($this->param)) {
                $return[0] = $object->{$this->method}(array_merge((array)$this->param, (array)$param));

                return $return;
            }
            $return[0] = $object->{$this->method}();

            return $return;
        }

        return $return;
    }
1038908
public void addParam(AstNode param) {
        assertNotNull(param);
        if (params == null) {
            params = new ArrayList<AstNode>();
        }
        params.add(param);
        param.setParent(this);
    }
916459
private function paramCommentsAlign($param, $previousParam)
	{
		$paramLength = strlen($param['type']) + $param['type_space'] + strlen($param['var']) + $param['var_space'];
		$prevLength  = strlen($previousParam['type']) + $previousParam['type_space'] + strlen($previousParam['var']) + $previousParam['var_space'];

		return $paramLength === $prevLength;
	}
549741
public function createAgendaClass($className, $param1 = null, $param2 = null)
    {
        $params = func_get_args();
        array_shift($params);

        return $this->_loadClass($className, true, $params);
    }
546754
public static function load($param) {
        global $DB;
        if (is_object($param)) {
            $event = new calendar_event($param);
        } else {
            $event = $DB->get_record('event', array('id' => (int)$param), '*', MUST_EXIST);
            $event = new calendar_event($event);
        }
        return $event;
    }