Last active
August 29, 2015 14:09
-
-
Save eimihar/748ef0b0a89ef46f8ab9 to your computer and use it in GitHub Desktop.
example logic behind multiple container binding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## original execution container | |
$original = function($result) | |
{ | |
return "this is original execution"; | |
} | |
## blocks of codes after multiple binding | |
## first (first-parent) container | |
$containers = function($result) | |
{ | |
## maybe we can return something else, or execute error route, if something failed here. | |
if($gotproblem) return "something else"; | |
## Second (sub-parent) container | |
return function($result) | |
{ | |
## Below is the original container. | |
return function($result) | |
{ | |
return "this is the original execution"; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment