Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Bastian Waidelich bwaidelich

🏠
Working from home
Block or report user

Report or block bwaidelich

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bwaidelich
bwaidelich / rollyourown.php
Created Jun 7, 2018 — forked from mathiasverraes/rollyourown.php
We don't need no DIC libs / we don't need no deps control
View rollyourown.php
<?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.
View Player.php
<?php
namespace TomasNorre\GolfnetInvitational\Domain\Model;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;
/**
* @Flow\Entity
*/
class Player {
View BytesViewHelper.php
<?php
namespace TYPO3\Fluid\ViewHelpers\Format;
/* *
* This script belongs to the TYPO3 Flow package "Fluid". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
View gist:2228357
<?php
namespace TYPO3\TYPO3\Setup\Step;
/* *
* This script belongs to the FLOW3 package "TYPO3.Setup". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
You can’t perform that action at this time.