for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByTIC\Omnipay\Paylike\Traits;
/**
* Trait HasApiTrait
* @package ByTIC\Omnipay\Paylike\Traits
*
* @method string getPrivateKey
*/
trait HasApiTrait
{
* @var null|\Paylike\Paylike
protected $api = null;
* @return \Paylike\Paylike
public function getApi()
if ($this->api == null) {
$this->initApi();
}
return $this->api;
protected function initApi()
$this->api = $this->generateApi();
* @throws \Paylike\Exception\ApiException
protected function generateApi()
return new \Paylike\Paylike($this->getPrivateKey());