PHP Classes
elePHPant
Icontem

File: example/index.php

Recommend this page to a friend!
  Classes of Samuel Adeshina  >  PHP Dependency Injection Container  >  example/index.php  >  Download  
File: example/index.php
Role: Example script
Content type: text/plain
Description: [Example] Index
Class: PHP Dependency Injection Container
Autoload dependent objects accessing variables
Author: By
Last change:
Date: 3 years ago
Size: 417 bytes
 

 

Contents

Class file image Download
<?php
   
   
require_once("Depender.php");

   
/*
    * Instantiate the Depender Class like a pro ;) [No need to worry about any dependencies]
    */
   
$dependerClass = new Example\Depender(); //
    /*
    * Use a method that makes use of properties/attributes from other classes (Dependee class in this case)
    * without passing those objects (or classes) as parameter!
    */
   
$dependerClass->callDependee(); //isn't this interesting?
?>