Skip to content

Commit 857f13d

Browse files
averikitschbshaffer
authored andcommitted
More Region Tag Updates (GoogleCloudPlatform#691)
1 parent 1888b0c commit 857f13d

File tree

13 files changed

+29
-55
lines changed

13 files changed

+29
-55
lines changed

appengine/flexible/laravel/config/logging.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@
6565
'driver' => 'errorlog',
6666
'level' => 'debug',
6767
],
68-
// [START stackdriver_channel_definition ]
6968
'stackdriver' => [
7069
'driver' => 'custom',
7170
'via' => App\Logging\CreateCustomLogger::class,
7271
'level' => 'debug',
7372
],
74-
// [END stackdriver_channel_definition ]
7573

7674
],
7775

appengine/flexible/metadata/app.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
# [START app]
1817
use Silex\Application;
1918

20-
# [START metadata]
19+
# [START gae_flex_metadata]
2120
function get_external_ip_using_google_cloud()
2221
{
2322
$metadata = new Google\Cloud\Core\Compute\Metadata();
@@ -38,7 +37,7 @@ function get_external_ip_using_curl()
3837
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
3938
return curl_exec($ch);
4039
}
41-
# [END metadata]
40+
# [END gae_flex_metadata]
4241

4342
// create the Silex application
4443
$app = new Application();
@@ -56,6 +55,5 @@ function get_external_ip_using_curl()
5655
}
5756
return sprintf('External IP: %s', $externalIp);
5857
});
59-
# [END app]
6058

6159
return $app;

appengine/flexible/tasks/index.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
// [START example_task_handler]
2019
require_once __DIR__ . '/vendor/autoload.php';
2120

2221
use Symfony\Component\HttpFoundation\Request;
@@ -46,4 +45,3 @@
4645
}
4746

4847
$app->run();
49-
// [END example_task_handler]

appengine/flexible/tasks/src/create_task.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
use Google_Service_CloudTasks_Task;
3030
use Google_Service_CloudTasks_CreateTaskRequest;
3131

32-
# [START create_task]
3332
/**
3433
* Create a task for a given App Engine queue
3534
* ```
@@ -89,4 +88,3 @@ function create_task($projectId, $queueId, $location, $payload = 'helloworld', $
8988
);
9089
printf('Created task %s' . PHP_EOL, $response['name']);
9190
}
92-
# [END create_task]

appengine/php55/cloudsql/app.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
# [START all]
18+
# [START gae_php_mysql_app]
1919
use Silex\Application;
2020
use Silex\Provider\TwigServiceProvider;
2121
use Symfony\Component\HttpFoundation\Request;
@@ -71,20 +71,18 @@
7171

7272
return $db;
7373
};
74-
# [END all]
74+
# [END gae_php_mysql_app]
7575

7676
$app->get('create_tables', function () use ($app) {
7777
/** @var PDO $db */
7878
$db = $app['database'];
79-
# [START create_tables]
8079
// create the tables
8180
$stmt = $db->prepare('CREATE TABLE IF NOT EXISTS entries ('
8281
. 'entryID INT NOT NULL AUTO_INCREMENT, '
8382
. 'guestName VARCHAR(255), '
8483
. 'content VARCHAR(255), '
8584
. 'PRIMARY KEY(entryID))');
8685
$result = $stmt->execute();
87-
# [END create_tables]
8886

8987
if (false === $result) {
9088
return sprintf("Error: %s\n", $stmt->errorInfo()[2]);

appengine/php55/cloudsql/app.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ handlers:
66
- url: /.*
77
script: index.php
88

9-
# [START env]
9+
# [START gae_php_mysql_env]
1010
env_variables:
1111
# Replace USER, PASSWORD, DATABASE, and CONNECTION_NAME with the
1212
# values obtained when configuring your Cloud SQL instance.
1313
MYSQL_DSN: mysql:unix_socket=/cloudsql/INSTANCE_CONNECTION_NAME;dbname=DATABASE
1414
MYSQL_USER: USER
1515
MYSQL_PASSWORD: PASSWORD
16-
# [END env]
16+
# [END gae_php_mysql_env]

appengine/php55/http/app.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/** @var Twig_Environment $twig */
3535
$twig = $app['twig'];
3636

37-
# [START http_bin]
37+
# [START gae_issue_request_http_bin]
3838
$url = 'http://httpbin.org/post?query=update';
3939
$data = ['data' => 'this', 'data2' => 'that'];
4040
$headers = "accept: */*\r\n" .
@@ -51,7 +51,7 @@
5151
];
5252
$context = stream_context_create($context);
5353
$result = file_get_contents($url, false, $context);
54-
# [END http_bin]
54+
# [END gae_issue_request_http_bin]
5555
return $twig->render('http.html.twig', ['file_result' => $result]);
5656
});
5757

@@ -64,7 +64,7 @@
6464
throw new \Exception('You must enable cURL or cURLite in php.ini');
6565
}
6666

67-
# [START curl_request]
67+
# [START gae_issue_request_curl_request]
6868
$url = 'http://httpbin.org/post?query=update';
6969
$data = ['data' => 'this', 'data2' => 'that'];
7070
$headers = [
@@ -92,15 +92,15 @@
9292

9393
// close connection
9494
curl_close($ch);
95-
# [END curl_request]
95+
# [END gae_issue_request_curl_request]
9696
return $twig->render('http.html.twig', ['curl_result' => $result]);
9797
});
9898

9999
$app->post('/request/guzzle', function () use ($app) {
100100
/** @var Twig_Environment $twig */
101101
$twig = $app['twig'];
102102

103-
# [START guzzle_request]
103+
# [START gae_issue_request_guzzle_request]
104104
$url = 'http://httpbin.org/post?query=update';
105105
$data = ['data' => 'this', 'data2' => 'that'];
106106
$headers = [
@@ -113,7 +113,7 @@
113113
$guzzle = new GuzzleHttp\Client;
114114
$request = new GuzzleHttp\Psr7\Request('POST', $url, $headers, http_build_query($data));
115115
$result = $guzzle->send($request);
116-
# [END guzzle_request]
116+
# [END gae_issue_request_guzzle_request]
117117

118118
return $twig->render('http.html.twig', ['guzzle_result' => $result->getBody()]);
119119
});

appengine/php55/mail/app.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,18 @@ threadsafe: yes
1717
api_version: 1
1818

1919
inbound_services:
20-
# [START mail_service]
20+
# [START gae_mail_api_service]
2121
- mail
22-
# [END mail_service]
23-
# [START bounce_service]
22+
# [END gae_mail_api_service]
2423
- mail_bounce
25-
# [END bounce_service]
2624
handlers:
27-
# [START incoming_handler]
25+
# [START gae_mail_api_incoming_handler]
2826
- url: /_ah/mail/.+
2927
script: handle_incoming_email.php
3028
login: admin
31-
# [END incoming_handler]
32-
# [START bounce_handler]
29+
# [END gae_mail_api_incoming_handler]
3330
- url: /_ah/bounce
3431
script: handle_bounced_email.php
3532
login: admin
36-
# [END bounce_handler]
3733
- url: .*
38-
script: index.php
34+
script: index.php

appengine/php55/mail/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
// [START all]
18+
// [START gae_mail_api]
1919
use google\appengine\api\mail\Message;
2020

2121
// Notice that $image_content_id is the optional Content-ID header value of the
@@ -37,4 +37,4 @@
3737
} catch (InvalidArgumentException $e) {
3838
echo 'There was an error';
3939
}
40-
// [END all]
40+
// [END gae_mail_api]

appengine/php55/mailgun/app.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
$mailgunDomain,
5353
$mailgunApiKey
5454
) {
55-
# [START simple_message]
5655
// Instantiate the client.
5756
$httpClient = new Http\Adapter\Guzzle6\Client();
5857
$mailgunClient = new Mailgun\Mailgun($mailgunApiKey, $httpClient);
@@ -64,7 +63,6 @@
6463
'subject' => 'Hello',
6564
'text' => 'Testing some Mailgun awesomeness!',
6665
));
67-
# [END simple_message]
6866
return $result;
6967
});
7068

@@ -75,7 +73,6 @@
7573
$cc = '',
7674
$bcc = ''
7775
) {
78-
# [START complex_message]
7976
// Instantiate the client.
8077
$httpClient = new Http\Adapter\Guzzle6\Client();
8178
$mailgunClient = new Mailgun\Mailgun($mailgunApiKey, $httpClient);
@@ -101,7 +98,6 @@
10198
$result = $mailgunClient->sendMessage($mailgunDomain, $postData, array(
10299
'attachment' => array($fileAttachment, $fileAttachment),
103100
));
104-
# [END complex_message]
105101
return $result;
106102
});
107103

appengine/php55/mailjet/app.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
$mailjet = $app['mailjet'];
4242
$recipient = $request->get('recipient');
4343

44-
# [START send_email]
44+
# [START gae_mailjet_send_message]
4545
$body = [
4646
'FromEmail' => "[email protected]",
4747
'FromName' => "Testing Mailjet",
@@ -66,7 +66,7 @@
6666
}
6767

6868
return 'Error: ' . print_r($response->getStatus(), true);
69-
# [END send_email]
69+
# [END gae_mailjet_send_message]
7070
});
7171

7272
$app['mailjet'] = function () use ($app) {
@@ -76,9 +76,9 @@
7676
$mailjetApiKey = $app['mailjet.api_key'];
7777
$mailjetSecret = $app['mailjet.secret'];
7878

79-
# [START mailjet_client]
79+
# [START gae_mailjet_import]
8080
$mailjet = new Mailjet\Client($mailjetApiKey, $mailjetSecret);
81-
# [END mailjet_client]
81+
# [END gae_mailjet_import]
8282

8383
return $mailjet;
8484
};

appengine/php55/memcache/app.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,46 +38,42 @@
3838
$app->post('/', function (Application $app, Request $request) {
3939
/** @var Twig_Environment $twig */
4040
$twig = $app['twig'];
41-
# [START who_count]
41+
# [START gae_memcache_who_count]
4242
$memcache = new Memcached;
4343
$memcache->set('who', $request->get('who'));
4444
return $twig->render('memcache.html.twig', [
4545
'who' => $request->get('who'),
4646
'count' => $memcache->increment('count', 1, 0),
4747
'host' => $request->getHost(),
4848
]);
49-
# [END who_count]
49+
# [END gae_memcache_who_count]
5050
});
5151

5252
// Simple HTTP GET and PUT operators.
5353
$app->get('/memcache/{key}', function ($key) {
54-
# [START memcache_get]
54+
# [START gae_memcache_get]
5555
$memcache = new Memcache;
5656
return $memcache->get($key);
57-
# [END memcache_get]
57+
# [END gae_memcache_get]
5858
});
5959

6060
$app->put('/memcache/{key}', function ($key, Request $request) {
61-
# [START memcache_put]
61+
# [START gae_memcache_put]
6262
$memcache = new Memcache;
6363
$value = $request->getContent();
6464
return $memcache->set($key, $value);
65-
# [END memcache_put]
65+
# [END gae_memcache_put]
6666
});
6767

6868
$app->get('/memcached/{key}', function ($key) {
69-
# [START memcached_get]
7069
$memcache = new Memcached;
7170
return $memcache->get($key);
72-
# [END memcached_get]
7371
});
7472

7573
$app->put('/memcached/{key}', function ($key, Request $request) {
76-
# [START memcached_put]
7774
$memcache = new Memcached;
7875
$value = $request->getContent();
7976
return $memcache->set($key, $value);
80-
# [END memcached_put]
8177
});
8278

8379
return $app;

appengine/php55/phpmyadmin/config.inc.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
3-
// [START_EXCLUDE silent]
42
/**
53
* Copyright 2016 Google Inc.
64
*
@@ -16,7 +14,6 @@
1614
* See the License for the specific language governing permissions and
1715
* limitations under the License.
1816
*/
19-
// [END_EXCLUDE]
2017
/*
2118
* This is needed for cookie based authentication to encrypt password in
2219
* cookie
@@ -62,4 +59,3 @@
6259
$cfg['PmaNoRelation_DisableWarning'] = true;
6360
$cfg['ExecTimeLimit'] = 60;
6461
$cfg['CheckConfigurationPermissions'] = false;
65-
// [END all]

0 commit comments

Comments
 (0)