Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\SpecificationBagDenormalizer\Constructor\ConstructorWithCallerDenormalizer::getCallerReference PHP Method

getCallerReference() private method

private getCallerReference ( Nelmio\Alice\FixtureInterface $scope, string $method ) : array
$scope Nelmio\Alice\FixtureInterface
$method string
return array The first element is a ServiceReferenceInterface ($caller) and the second a string ($method)
    private function getCallerReference(FixtureInterface $scope, string $method) : array
    {
        if (false === strpos($method, '::')) {
            return [new StaticReference($scope->getClassName()), $method];
        }
        $explodedMethod = explode('::', $method);
        if (2 < count($explodedMethod)) {
            throw InvalidArgumentExceptionFactory::createForInvalidConstructorMethod($method);
        }
        list($caller, $method) = $explodedMethod;
        if (0 === strpos($caller, '@')) {
            return [new InstantiatedReference(substr($caller, 1)), $method];
        }
        return [new StaticReference($caller), $method];
    }
ConstructorWithCallerDenormalizer