first commit
This commit is contained in:
52
vendor/php-flasher/flasher/EventDispatcher/Event/FilterEvent.php
vendored
Normal file
52
vendor/php-flasher/flasher/EventDispatcher/Event/FilterEvent.php
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Filter\Filter;
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class FilterEvent
|
||||
{
|
||||
/**
|
||||
* @var Filter
|
||||
*/
|
||||
private $filter;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
* @param array<string, mixed> $criteria
|
||||
*/
|
||||
public function __construct(array $envelopes, array $criteria)
|
||||
{
|
||||
$this->filter = new Filter($envelopes, $criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->filter->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Filter
|
||||
*/
|
||||
public function getFilter()
|
||||
{
|
||||
return $this->filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setFilter(Filter $filter)
|
||||
{
|
||||
$this->filter = $filter;
|
||||
}
|
||||
}
|
44
vendor/php-flasher/flasher/EventDispatcher/Event/PersistEvent.php
vendored
Normal file
44
vendor/php-flasher/flasher/EventDispatcher/Event/PersistEvent.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class PersistEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopes;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*/
|
||||
public function __construct(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setEnvelopes(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
}
|
34
vendor/php-flasher/flasher/EventDispatcher/Event/PostPersistEvent.php
vendored
Normal file
34
vendor/php-flasher/flasher/EventDispatcher/Event/PostPersistEvent.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class PostPersistEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopes;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*/
|
||||
public function __construct(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->envelopes;
|
||||
}
|
||||
}
|
49
vendor/php-flasher/flasher/EventDispatcher/Event/PostRemoveEvent.php
vendored
Normal file
49
vendor/php-flasher/flasher/EventDispatcher/Event/PostRemoveEvent.php
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class PostRemoveEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopesToRemove;
|
||||
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopesToKeep;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopesToRemove
|
||||
* @param Envelope[] $envelopesToKeep
|
||||
*/
|
||||
public function __construct(array $envelopesToRemove = array(), array $envelopesToKeep = array())
|
||||
{
|
||||
$this->envelopesToRemove = $envelopesToRemove;
|
||||
$this->envelopesToKeep = $envelopesToKeep;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopesToRemove()
|
||||
{
|
||||
return $this->envelopesToRemove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopesToKeep()
|
||||
{
|
||||
return $this->envelopesToKeep;
|
||||
}
|
||||
}
|
34
vendor/php-flasher/flasher/EventDispatcher/Event/PostUpdateEvent.php
vendored
Normal file
34
vendor/php-flasher/flasher/EventDispatcher/Event/PostUpdateEvent.php
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class PostUpdateEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopes;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*/
|
||||
public function __construct(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->envelopes;
|
||||
}
|
||||
}
|
49
vendor/php-flasher/flasher/EventDispatcher/Event/PresentationEvent.php
vendored
Normal file
49
vendor/php-flasher/flasher/EventDispatcher/Event/PresentationEvent.php
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class PresentationEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopes;
|
||||
|
||||
/**
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $context;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
* @param mixed[] $context
|
||||
*/
|
||||
public function __construct(array $envelopes, array $context)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
$this->context = $context;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
public function getContext()
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
}
|
67
vendor/php-flasher/flasher/EventDispatcher/Event/RemoveEvent.php
vendored
Normal file
67
vendor/php-flasher/flasher/EventDispatcher/Event/RemoveEvent.php
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class RemoveEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopesToRemove = array();
|
||||
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopesToKeep = array();
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopesToRemove
|
||||
*/
|
||||
public function __construct(array $envelopesToRemove)
|
||||
{
|
||||
$this->envelopesToRemove = $envelopesToRemove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopesToRemove()
|
||||
{
|
||||
return $this->envelopesToRemove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopesToRemove
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setEnvelopesToRemove($envelopesToRemove)
|
||||
{
|
||||
$this->envelopesToRemove = $envelopesToRemove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopesToKeep()
|
||||
{
|
||||
return $this->envelopesToKeep;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopesToKeep
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setEnvelopesToKeep($envelopesToKeep)
|
||||
{
|
||||
$this->envelopesToKeep = $envelopesToKeep;
|
||||
}
|
||||
}
|
57
vendor/php-flasher/flasher/EventDispatcher/Event/ResponseEvent.php
vendored
Normal file
57
vendor/php-flasher/flasher/EventDispatcher/Event/ResponseEvent.php
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
final class ResponseEvent
|
||||
{
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $response;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $presenter;
|
||||
|
||||
/**
|
||||
* @param mixed $response
|
||||
* @param string $presenter
|
||||
*/
|
||||
public function __construct($response, $presenter)
|
||||
{
|
||||
$this->response = $response;
|
||||
$this->presenter = $presenter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $response
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setResponse($response)
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPresenter()
|
||||
{
|
||||
return $this->presenter;
|
||||
}
|
||||
}
|
16
vendor/php-flasher/flasher/EventDispatcher/Event/StoppableEventInterface.php
vendored
Normal file
16
vendor/php-flasher/flasher/EventDispatcher/Event/StoppableEventInterface.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
interface StoppableEventInterface
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPropagationStopped();
|
||||
}
|
44
vendor/php-flasher/flasher/EventDispatcher/Event/UpdateEvent.php
vendored
Normal file
44
vendor/php-flasher/flasher/EventDispatcher/Event/UpdateEvent.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the PHPFlasher package.
|
||||
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
|
||||
*/
|
||||
|
||||
namespace Flasher\Prime\EventDispatcher\Event;
|
||||
|
||||
use Flasher\Prime\Notification\Envelope;
|
||||
|
||||
final class UpdateEvent
|
||||
{
|
||||
/**
|
||||
* @var Envelope[]
|
||||
*/
|
||||
private $envelopes;
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*/
|
||||
public function __construct(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Envelope[]
|
||||
*/
|
||||
public function getEnvelopes()
|
||||
{
|
||||
return $this->envelopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Envelope[] $envelopes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setEnvelopes(array $envelopes)
|
||||
{
|
||||
$this->envelopes = $envelopes;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user