/**
  * @param RuntimeConfiguration $configuration
  *
  * @return NewOperator
  */
 public function generate(RuntimeConfiguration $configuration)
 {
     $this->typeCheck->generate(func_get_args());
     $validatorNamespaceCall = new Call(new StaticMember(QualifiedIdentifier::fromString('\\Eloquent\\Cosmos\\ClassName'), new Constant(new Identifier('fromString'))));
     $validatorNamespaceCall->add(new Literal($configuration->validatorNamespace()->string()));
     $newConfigurationCall = new Call(QualifiedIdentifier::fromString('\\Eloquent\\Typhoon\\Configuration\\RuntimeConfiguration'));
     $newConfigurationCall->add($validatorNamespaceCall);
     $newConfigurationCall->add(new Literal($configuration->useNativeCallable()));
     return new NewOperator($newConfigurationCall);
 }
Exemplo n.º 2
0
 /**
  * @param RuntimeConfiguration $configuration
  *
  * @return boolean
  */
 public function useNativeCallable(RuntimeConfiguration $configuration)
 {
     $this->typeCheck->useNativeCallable(func_get_args());
     return $configuration->useNativeCallable() && $this->nativeCallableAvailable();
 }