Core/src/EmulatorTrait.php
private function emulatorGapicConfig($emulatorHost)
    {
        // Strip the URL scheme from the input, if it was provided.
        if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) {
            $search = $scheme . '://';
            $emulatorHost = str_replace($search, '', $emulatorHost);
        }

        return [
            'serviceAddress' => $emulatorHost,
            'transportConfig' => [
                'grpc' => [
                    'stubOpts' => [
                        'credentials' => \Grpc\ChannelCredentials::createInsecure()
                    ]
                ]
            ]
        ];
    }
private function emulatorGapicConfig($emulatorHost)
    {
        // Strip the URL scheme from the input, if it was provided.
        if ($scheme = parse_url($emulatorHost, PHP_URL_SCHEME)) {
            $search = $scheme . '://';
            $emulatorHost = str_replace($search, '', $emulatorHost);
        }

        return [
            'serviceAddress' => $emulatorHost,
            'transportConfig' => [
                'grpc' => [
                    'stubOpts' => [
                        'credentials' => \Grpc\ChannelCredentials::createInsecure()
                    ]
                ]
            ]
        ];
    }
private function emulatorGapicConfig ( $ emulatorHost ) { // Strip the URL scheme from the input, if it was provided. if ( $ scheme = parse_url ( $ emulatorHost , PHP_URL_SCHEME ) ) { $ search = $ scheme . '://' ; $ emulatorHost = str_replace ( $ search , '' , $ emulatorHost ) ; } return [ 'serviceAddress' => $ emulatorHost , 'transportConfig' => [ 'grpc' => [ 'stubOpts' => [ 'credentials' => \ Grpc \ ChannelCredentials :: createInsecure ( ) ] ] ] ] ; }
Configure the gapic configuration to use a service emulator.

@param string $emulatorHost
@return array
Configure the gapic configuration to use a service emulator .