/** * Adds a variable to the class * Throws Exception if the variable does already exist * * @param PhpVariable $variable The variable object to add * @access public * @throws Exception If the variable name already exists */ public function addVariable(PhpVariable $variable) { if ($this->variableExists($variable->getIdentifier())) { throw new Exception('A variable of the name (' . $variable->getIdentifier() . ') does already exist.'); } $this->variables[$variable->getIdentifier()] = $variable; }
/** * @see \WsdlToPhp\PhpGenerator\Element\AbstractAssignedValueElement::getAnyValue() * @return string */ protected function getAnyValue($value) { if (is_array($value)) { return str_replace(array(self::BREAK_LINE_CHAR, ' '), '', var_export($value, true)); } return parent::getAnyValue($value); }