Beispiel #1
0
 /**
  * @test
  */
 public function defaultPropertyMappingConfigurationDoesNotAllowCreationOrModificationOfObjects()
 {
     $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED));
     $this->assertNull($this->simpleValueArgument->getPropertyMappingConfiguration()->getConfigurationValue(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED));
 }
 /**
  * Creates, adds and returns a new controller argument to this composite object.
  * If an argument with the same name exists already, it will be replaced by the
  * new argument object.
  *
  * @param string $name Name of the argument
  * @param string $dataType Name of one of the built-in data types
  * @param boolean $isRequired TRUE if this argument should be marked as required
  * @param mixed $defaultValue Default value of the argument. Only makes sense if $isRequired==FALSE
  * @return Argument The new argument
  * @api
  */
 public function addNewArgument($name, $dataType = 'string', $isRequired = true, $defaultValue = null)
 {
     $argument = new Argument($name, $dataType);
     $argument->setRequired($isRequired);
     $argument->setDefaultValue($defaultValue);
     $this->addArgument($argument);
     return $argument;
 }