call() public static method

public static call ( string $serviceId, callable $getResult )
$serviceId string
$getResult callable
Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function parse(string $value)
 {
     return KernelIsolatedServiceCall::call('nelmio_alice.fixture_builder.expression_language.parser', function (ParserInterface $parser) use($value) {
         return $parser->parse($value);
     });
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function loadFile(string $file, array $parameters = [], array $objects = []) : ObjectSet
 {
     return KernelIsolatedServiceCall::call('nelmio_alice.file_loader', function (FileLoaderInterface $loader) use($file, $parameters, $objects) {
         return $loader->loadFile($file, $parameters, $objects);
     });
 }
 /**
  * @inheritdoc
  */
 public function resolve(ParameterBag $unresolvedParameters, ParameterBag $injectedParameters = null) : ParameterBag
 {
     return KernelIsolatedServiceCall::call('nelmio_alice.generator.resolver.parameter_bag', function (ParameterBagResolverInterface $resolver) use($unresolvedParameters, $injectedParameters) {
         return $resolver->resolve($unresolvedParameters, $injectedParameters);
     });
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function lex(string $value) : array
 {
     return KernelIsolatedServiceCall::call('nelmio_alice.fixture_builder.expression_language.lexer', function (LexerInterface $lexer) use($value) {
         return $lexer->lex($value);
     });
 }