This file contains hidden or 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
<?php | |
// Context: I'm trying to argue that DI (and DIC) are great, and DIC libs suck. | |
// Happy to be proven wrong! | |
final class Router { | |
private $dependencies; | |
public function __construct (Dependencies $dependencies) { | |
$this->dependencies = $dependencies; | |
// You might say that this is Service Locator, but it's not. This router is toplevel, | |
// and toplevel must have access to dependencies. After that it can all just bubble nicely using proper DI. |
This file contains hidden or 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
prototype(Sfi.Site:ImageUri) < prototype(TYPO3.TypoScript:Case) { | |
image { | |
condition = ${asset} | |
renderer = ImageUri { | |
asset = ${asset} | |
width = ${width} | |
height = ${height} | |
maximumWidth = ${maximumWidth} | |
maximumHeight = ${maximumHeight} | |
allowCropping = ${allowCropping} |
This file contains hidden or 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
<?php | |
namespace Your\Package\ViewHelpers\Format; | |
/* * | |
* This script belongs to the TYPO3 Flow package "Your.Package. * | |
* * | |
* */ | |
use TYPO3\Flow\Annotations as Flow; | |
use TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper; |
This file contains hidden or 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
<?php | |
namespace Your\Package\Domain\Repository; | |
use TYPO3\Flow\Annotations as Flow; | |
/** | |
* @Flow\Scope("singleton") | |
*/ | |
abstract class AbstractTreeRepository extends \Gedmo\Tree\Entity\Repository\NestedTreeRepository implements \TYPO3\Flow\Persistence\RepositoryInterface { |