Skip to content

Instantly share code, notes, and snippets.

@manuakasam
Created October 5, 2015 12:25
Show Gist options
  • Save manuakasam/563cd74b2fafe7116dd0 to your computer and use it in GitHub Desktop.
Save manuakasam/563cd74b2fafe7116dd0 to your computer and use it in GitHub Desktop.
Config stuff
<?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