Skip to content

Instantly share code, notes, and snippets.

@eimihar
Last active August 29, 2015 14:09
Show Gist options
  • Save eimihar/748ef0b0a89ef46f8ab9 to your computer and use it in GitHub Desktop.
Save eimihar/748ef0b0a89ef46f8ab9 to your computer and use it in GitHub Desktop.
example logic behind multiple container binding
## 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