run before

@access public
@param  array $aParams parameters
@return \Apollina\Template\Assign
975829
public function replaceBy($aParams = array()) 
	{
		if (isset($aParams['var'])) { $sVar = '$_aProtectedVar["'.$aParams['var'].'"]'; }
		else { new \Exception('Assign: var obligatory');}

		if (!isset($aParams['value'])) { new \Exception('Assign: value obligatory');}

		if (isset($aParams['var']) && isset($aParams['value'])) {

			return '<?php '.$sVar.' = '.$aParams['value'].'; ?>';
		}
	}
403818
public function execute($params)
    {
        $this->method = array_shift($params);
        $this->prepare($params);

        return $this->httpClient
            ->setMethod('post')
            ->setEndPoint(static::ENDPOINT.$this->method.'/')
            ->authHeaders()
            ->addHeader([ 'Content-Type' => 'application/json' ])
            ->setParams($this->params)
            ->send();
    }
1328624
public function replaceBy($aParams = array()) 
	{
		if (isset($aParams['alias'])) {

			$sAlias = $aParams['alias'];
			unset($aParams['alias']);

			$sArrayConstruct = 'array( ';

			foreach ($aParams as $sKey => $oOne) {

				$sArrayConstruct .= "'$sKey' => $oOne,";
			}

			$sArrayConstruct = substr($sArrayConstruct, 0, -1);
			$sArrayConstruct .= ')';

			return '<?php $oUrlManager = new \Venus\core\UrlManager; echo $oUrlManager->getUrl('.$sAlias.', '.$sArrayConstruct.'); ?>';
		}
	}
729096
public function setArgsValues(array $params = null, array $instanceArgs)
    {
        if (is_array($params)) {
            foreach ($params as $param) {
                foreach ($instanceArgs as &$instanceArg) {
                    if (is_null($instanceArg)) {
                        $instanceArg = $param;
                        break;
                    }
                }
            }
        }

        return $instanceArgs;
    }
634639
public function bind(array $params)
    {
        foreach ($params as $key => $value) {
            $this->getParameters()->set($key, $value);
        }

        return $this;
    }
798571
public function setParams(array $params = array())
    {
        foreach ($params as $key => $value) {
            if (null != $value) {
                $this->$key = $value;
            }
        }

        return $this;
    }
365455
public static function submit($params = array()) {

        if( !is_array($params) )
        {
            throw new \InvalidArgumentException("Arguments is not a Array". print_r($params, true));
        }

        $o = '<input type="submit"';
        $o .= (isset($params['id'])) ? " id='{$params['id']}'" : '';
        $o .= (isset($params['name'])) ? " name='{$params['name']}'" : '';
        $o .= (isset($params['class'])) ? " class='{$params['class']}'" : '';
        $o .= (isset($params['onclick'])) ? " onclick='{$params['onclick']}'" : '';
        $o .= (isset($params['value'])) ? " value='{$params['value']}'" : '';
        $o .= (isset($params['disabled'])) ? " disabled='{$params['disabled']}'" : '';
        $o .= (isset($params['style'])) ? " style='{$params['style']}'" : '';
        $o .= " />\n";
        return $o;
    }
1260808
public function bind(array $params)
    {
        foreach ($params as $key => $value) {
            $this->addParam($value, $key);
        }
        return $this;
    }
257187
public function replaceBy($aParams = array()) 
	{
		$sFile = '';

		if (isset($aParams['file'])) { $sFile = $aParams['file']; }
		else { new \Exception('ConfigLoad: file obligatory');}

		$sViewDirectory = str_replace('lib'.DIRECTORY_SEPARATOR.'Template'.DIRECTORY_SEPARATOR.'Function',
			'src'.DIRECTORY_SEPARATOR.PORTAL.DIRECTORY_SEPARATOR.'View'.DIRECTORY_SEPARATOR, __DIR__);

		$aConfVars = parse_ini_file($sViewDirectory.$sFile);

		$sContent = '';
		$sContent = $this->_constructVar($sContent, $aConfVars, '$_aProtectedVar[\'app\'][\'config\']');

		return '<?php '.$sContent.'; ?>';
	}
962531
public function set($condition, array $params = [])
    {
        $this->conditions = [];
        $this->add($condition, $params);
        return $this;
    }
775376
private function createAssignsFromParams(array $params): array
    {
        $assigns = [];

        /** @var Param $param */
        foreach ($params as $param) {
            $propertyFetch = new PropertyFetch(new Variable('this'), $param->var->name);
            $assigns[] = new Assign($propertyFetch, new Variable($param->var->name));
        }

        return $assigns;
    }
1344095
public function params($params) {

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($data)), E_USER_ERROR);
		}

		$this -> params = $params;

		return $this;
	}
458597
public function loadParams(array $params)
    {
        $this->arguments = array();
        $this->options = array();

        foreach ($params as $param) {
            if (strpos($param, '-') !== false) {
                $this->options[] = $this->extractOption($param);
            } else {
                $this->arguments[] = $param;
            }
        }

        return $this;
    }
178311
public function updateDefault(array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::PUT,
            ResourceMethodEnum::UPDATE_DEFAULT,
            $params,
            null
        );
    }
1088092
public function setMany(array $params)
    {
        foreach ($params as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
825948
public function proceed($params = [])
    {
        // before
        if (isset($this->advice['before']) && !empty($this->advice['before'])) {
            list($aspectClass, $aspectMethod) = $this->advice['before'];
            $aspect = App::getBean($aspectClass);
            $aspect->$aspectMethod();
        }

        if (empty($this->advices)) {
            // execute
            $methodParams = !empty($params) ? $params : $this->args;
            $result       = $this->target->{$this->method}(...$methodParams);
        } else {
            /* @var \Swoft\Aop\Aop $aop */
            $aop    = App::getBean(Aop::class);
            $result = $aop->doAdvice($this->target, $this->method, $this->args, $this->advices);
        }

        return $result;
    }
1087657
public function setParams($params)
    {
        if (!empty($params)) {
            foreach ($params as $key => $value) {
                $this->options[ 'json' ][ $key ] = $value;
            }
        }
        return $this;
    }