for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Flipbox\Relay\HubSpot\Segment\Contacts;
use Flipbox\Relay\Middleware\Stash as CacheMiddleware;
use Flipbox\Relay\HubSpot\Middleware\Contacts\GetByEmail as ContactByEmailMiddleware;
use Flipbox\Relay\HubSpot\Middleware\Client;
use Flipbox\Relay\Segments\AbstractSegment;
use Psr\Cache\CacheItemPoolInterface;
class GetByEmail extends AbstractSegment
{
/**
* @var string
*/
public $email;
* @var CacheItemPoolInterface
public $cache;
* @return array
protected function defaultSegments(): array
return [
'uri' => [
'class' => ContactByEmailMiddleware::class,
'id' => $this->email,
'logger' => $this->getLogger()
],
'cache' => [
'class' => CacheMiddleware::class,
'pool' => $this->cache,
'client' => [
'class' => Client::class,
]
];
}