자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
/** * Create newinstance of AnonymousFunction * * @param array $parameters Array of parameters * @param string $code Body of the function */ public function __construct($parameters, $code) { $this->_parameters = $parameters; foreach ($this->_parameters as $parameter) { if (strpos($parameter, '$') !== 0) { throw new \InvalidArgumentException(Messages::anonymousFunctionParameterShouldStartWithDollorSymbol()); } } $this->_parametersAsString = implode(', ', $this->_parameters); $this->_code = $code; }