Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

PHP Strategy Pattern OOP | 29

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,537
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 19, 2011

Download Source @ http://jream.com/lab/open-source
Ill show you how to use the Strategy Pattern in PHP. "The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. "

http://jream.com

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (JREAMdesign)

  • What happend to your channel home page? Also I love the intro.

  • @JragonLtd I got rid of all the stuff there

  • aka polymorphism

  • @slier81 I cant even remember what I blab in these videos. Ill do State pattern next probably since its just like this. Then Composite and maybe Iterator, Composite is awesome IMO.

  • If you look at the client area (the index.php file) it will help you better understand how this pattern works

see all

All Comments (9)

Sign In or Sign Up now to post a comment!
  • Really like the video. Have a question, I have a class that does processing for various clients I have. To do this processing, for each client, I need to retrieve some values. However, the way I retrieve these values, is different for each client. Would the strategy pattern be good to use here?

  • @wrdeboise A nice way is to use something like spl_autoload_register(array($t­his, 'loader')) in your constructor...then a method like loader($className) { //include file }

  • since php 5.3 you can use type hints

  • Do you think you can explain how to create an __autoloader class? I'd like to see an easy way to load all those classes. Thanks

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more