App Engine Python SDK version 1.8.1
[gae.git] / python / php / sdk / google / appengine / api / app_identity / PublicCertificate.php
blobae03a47aff3083cbc9ea8a3f7172c976cfaae17e
1 <?php
2 /**
3 * Copyright 2007 Google Inc.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 /**
20 namespace google\appengine\api\app_identity;
22 /**
23 * PublicCertificate contains an X509 public certificate in PEM format and a
24 * string which is used to identify this certificate.
26 final class PublicCertificate {
28 /**
29 * The name of the certificate.
30 * @var string
32 private $certificate_name;
34 /**
35 * The public certificate in X509 PEM format.
36 * @var string
38 private $certificate;
40 /**
41 * Creates a new public certificate.
43 * @param string $certificate_name The name of the certificate.
44 * @param string $certificate_in_pem_format The public certificate in X509
45 * PEM format.
47 public function __construct($certificate_name,
48 $certificate_in_pem_format) {
49 $this->certificate_name = $certificate_name;
50 $this->certificate = $certificate_in_pem_format;
53 /**
54 * Returns the name of this public certificate.
56 * @return string The name of the certificate.
58 public function getCertificateName() {
59 return $this->certificate_name;
62 /**
63 * Returns the X509 Certificate in PEM format.
65 * @return string The public certificate in X509 PEM format.
67 public function getX509CertificateInPemFormat() {
68 return $this->certificate;