The PHP function below is producing this error: Parse error: syntax error, unexpected ',', on this line that contens this code:( $className, new $this->registerService( $service ) );
Does anyone know what's wrong?
function lazyCreateSingletonServiceByClassName($className) {
$service = $this->createContextAwareObjectOfClass( $className );
if (method_exists( $service, 'init' )) {
$service->init( );
}
SingletonServiceProvider;
( $className, new $this->registerService( $service ) );
}
tanks