-
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 #27 from knpuniversity/code-blocks-ch14
Add code blocks to the ch14 (clear-data-symfony-extension)
- Loading branch information
Showing
2 changed files
with
117 additions
and
24 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
55 changes: 55 additions & 0 deletions
55
vendor/behat/symfony2-extension/src/Behat/Symfony2Extension/Context/KernelDictionary.php
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,55 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Behat Symfony2Extension | ||
* | ||
* (c) Konstantin Kudryashov <ever.zet@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Behat\Symfony2Extension\Context; | ||
|
||
use Symfony\Component\HttpKernel\KernelInterface; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
/** | ||
* Kernel support methods for Symfony2Extension. | ||
* | ||
* @author Konstantin Kudryashov <ever.zet@gmail.com> | ||
*/ | ||
trait KernelDictionary | ||
{ | ||
private $kernel; | ||
|
||
/** | ||
* Sets Kernel instance. | ||
* | ||
* @param KernelInterface $kernel | ||
*/ | ||
public function setKernel(KernelInterface $kernel) | ||
{ | ||
$this->kernel = $kernel; | ||
} | ||
|
||
/** | ||
* Returns HttpKernel instance. | ||
* | ||
* @return KernelInterface | ||
*/ | ||
public function getKernel() | ||
{ | ||
return $this->kernel; | ||
} | ||
|
||
/** | ||
* Returns HttpKernel service container. | ||
* | ||
* @return ContainerInterface | ||
*/ | ||
public function getContainer() | ||
{ | ||
return $this->kernel->getContainer(); | ||
} | ||
} |