Skip to content

Instantly share code, notes, and snippets.

GDmac GDmac

  • Netherlands
Block or report user

Report or block GDmac

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
@GDmac
GDmac / rollyourown.php
Created Mar 27, 2019 — 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.
@GDmac
GDmac / EE_ftp.php
Last active Dec 29, 2015 — forked from davist11/Ftp.php
Call with $this->EE->load->library('my_ftp'); It will load CI_ftp and replace $this->EE->ftp with your ftp class
View EE_ftp.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once(BASEPATH . 'libraries/Ftp.php');
class EE_FTP extends CI_FTP {
var $timeout = 90;
/**
* FTP Connect
You can’t perform that action at this time.