2017 © Pedro Peláez
 

library phpmef

PHPMEF allows easy composition and extensibility in an application.

image

phpmef/phpmef

PHPMEF allows easy composition and extensibility in an application.

  • Tuesday, July 8, 2014
  • by maartenba
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHPMEF - PHP Managed Extensibility Framework

PHPMEF is a PHP port of the .NET Managed Extensibility Framework, allowing easy composition and extensibility in an application using the Inversion of Control principle and 2 easy keywords: @export and @import., (*1)

Downloads

Latest download can be found under releases., (*2)

Hello, PHPMEF!

Here's a simple example on how PHPMEF can be used:, (*3)


  class HelloWorld {
      /**
       * @import-many MessageToSay
       */
      public $Messages;
  
      public function sayIt() {
          echo implode(', ', $this->Messages);
      }
  }
  
  class Hello {
      /**
       * @export MessageToSay
       */
      public $HelloMessage = 'Hello';
  }
  
  class World {
      /**
       * @export MessageToSay
       */
      public $WorldMessage = 'World!';
  }
  
  $helloWorld = new HelloWorld();
  
  $compositionInitializer = new MEF_CompositionInitializer(new MEF_Container_Default());
  $compositionInitializer->satisfyImports($helloWorld);
  
  $helloWorld->sayIt(); // Hello, World!

Check the wiki for more information., (*4)

The Versions

08/07 2014

dev-master

9999999-dev https://github.com/maartenba/phpmef

PHPMEF allows easy composition and extensibility in an application.

  Sources   Download

BSD-3-Clause

The Development Requires