for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Notimatica\Driver\Apns;
use League\Flysystem\Filesystem;
use Notimatica\Driver\Project;
class Certificate
{
/**
* @var Filesystem
*/
protected $storage;
* @var array
protected $paths = [
'p12' => 'certificate.p12',
'pem' => 'certificate.pem',
'password' => 'certificate.password',
];
* Create a new Certificate.
*
* @param Filesystem $storage
public function __construct(Filesystem $storage)
$this->storage = $storage;
}
* Return certificate.
* @return string
public function getP12Certificate()
try {
return $this->storage->get($this->paths['p12']);
} catch (\Exception $e) {
return '';
* Return password.
public function getPassword()
return $this->storage->get($this->paths['password']);
* Get pem certificate.
public function getPemCertificate()
return $this->storage->get($this->paths['pem']);
* Return pem certificate path.
public function getPemCertificatePath()
return $this->storage->getAdapter()->applyPathPrefix($this->paths['pem']);
* Set certificates filenames.
* @param array $paths
* @return $this
public function setPaths(array $paths)
$this->paths = $paths;
return $this;