Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56ee511
commit 083b3a2
Showing
7 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Bacart package. | ||
* | ||
* (c) Alex Bacart <alex@bacart.net> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Bacart\SymfonyAware\Interfaces; | ||
|
||
use Symfony\Component\Mercure\Authorization; | ||
|
||
interface MercureAuthorizationAwareInterface | ||
{ | ||
public function setMercureAuthorization(Authorization $mercureAuthorization): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Bacart package. | ||
* | ||
* (c) Alex Bacart <alex@bacart.net> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Bacart\SymfonyAware\Interfaces; | ||
|
||
use Symfony\Component\Mercure\HubInterface; | ||
|
||
interface MercureHubAwareInterface | ||
{ | ||
public function setMercureHub(HubInterface $MercureHub): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Bacart package. | ||
* | ||
* (c) Alex Bacart <alex@bacart.net> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Bacart\SymfonyAware\Traits; | ||
|
||
use Symfony\Component\Mercure\Authorization; | ||
use Symfony\Contracts\Service\Attribute\Required; | ||
|
||
trait MercureAuthorizationAwareTrait | ||
{ | ||
protected Authorization $mercureAuthorization; | ||
|
||
#[Required] | ||
public function setMercureAuthorization(Authorization $mercureAuthorization): void | ||
{ | ||
$this->mercureAuthorization = $mercureAuthorization; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Bacart package. | ||
* | ||
* (c) Alex Bacart <alex@bacart.net> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Bacart\SymfonyAware\Traits; | ||
|
||
use Symfony\Component\Mercure\HubInterface; | ||
use Symfony\Contracts\Service\Attribute\Required; | ||
|
||
trait MercureHubAwareTrait | ||
{ | ||
protected HubInterface $mercureHub; | ||
|
||
#[Required] | ||
public function setMercureHub(HubInterface $mercureHub): void | ||
{ | ||
$this->mercureHub = $mercureHub; | ||
} | ||
} |