Notable PHP package: PHP Object Factory

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2020-04-26

Posted on: 2020-04-26

Viewers: 100 (April 2020 until May 2020)

Last month viewers: 49 (May 2020)

Categories: Notable Packages

Sometimes applications need to implement a certain functionality in a dynamic way.

This means that the way that functionality will be implemented is not determined initially when the current PHP script starts, as it depends on factors that will be evaluated later during the execution of the script.

This package provides a solution to implement that possibility by providing means for registering interfaces dynamically to implement the desired functionality.

Read this article to learn more details about how this notable PHP package works.




The package PHP Object Factory is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Create objects of given types defined by name

Here follows in more detail what it does:

This package can be used to create objects of given types defined by interface.

It provides a means to register an interface that will be associated to a class that will be used to create the object when the getInstance or getShared functions of the factory are called passing the identification of the interface.

The package can also register an interface provider by associating to a callback function, so when the getInstance or getSharedInstance functions of the factory is called, it will invoke a given callback function that takes as parameter a string with a name that can be used by the callback function to determine what is the class of the object that will be created.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

For more information send a message to info at phpclasses dot org.