-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from mindaugasbarysas/pipeline-leak
Fixes for pipeline leaks, introduces breaking changes.
- Loading branch information
Showing
9 changed files
with
97 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the ONGR package. | ||
* | ||
* (c) NFQ Technologies UAB <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace ONGR\ConnectionsBundle\Pipeline; | ||
|
||
/** | ||
* Class for skipping items. | ||
*/ | ||
class ItemSkip | ||
{ | ||
/** | ||
* @var string Reason for skipping. | ||
*/ | ||
private $reason; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getReason() | ||
{ | ||
return $this->reason; | ||
} | ||
|
||
/** | ||
* @param string $reason | ||
*/ | ||
public function setReason($reason) | ||
{ | ||
$this->reason = $reason; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,34 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the ONGR package. | ||
* | ||
* (c) NFQ Technologies UAB <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace ONGR\ConnectionsBundle\Pipeline; | ||
|
||
use ONGR\ConnectionsBundle\Pipeline\Event\ItemPipelineEvent; | ||
|
||
/** | ||
* Provides a static method for skipping unwanted items. | ||
*/ | ||
class ItemSkipper | ||
{ | ||
/** | ||
* Skips item, marks event as skipped with a reason. | ||
* | ||
* @param ItemPipelineEvent $event | ||
* @param string $reason | ||
*/ | ||
public static function skip(ItemPipelineEvent $event, $reason = '') | ||
{ | ||
$itemSkip = new ItemSkip(); | ||
$itemSkip->setReason($reason); | ||
$event->setItemSkip($itemSkip); | ||
$event->stopPropagation(); | ||
} | ||
} |
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