Created
October 5, 2015 12:25
-
-
Save manuakasam/563cd74b2fafe7116dd0 to your computer and use it in GitHub Desktop.
Config stuff
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
<?php | |
namespace Foo; | |
class Module | |
{ | |
/* This config willk be cached */ | |
public function getConfig() { return []; } | |
/** | |
* This config will NOT be cached | |
* It will map into 'filters' key of getConfig() | |
*/ | |
public function getFilterConfig() | |
{ | |
return [ | |
'invokables' => [ | |
'ToFloat' => function ($input) { | |
return floatval($input); | |
} | |
] | |
]; | |
} | |
// For more stuff read http://framework.zend.com/manual/current/en/tutorials/config.advanced.html#configuration-mapping-table | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment