Refactored plugins

This commit is contained in:
Dmitry Khomutov 2016-07-11 22:00:04 +06:00
commit 16a5add859
45 changed files with 404 additions and 1224 deletions

View file

@ -1,23 +0,0 @@
<?php
return function (PHPCensor\Plugin\Util\Factory $factory) {
$factory->registerResource(
// This function will be called when the resource is needed.
function() {
return [
'Foo' => "Stuff",
'Bar' => "More Stuff"
];
},
// In addition to the function for building the resource the system
// also needs to be told when to load the resource. Either or both
// of the following arguments can be used (null to ignore)
// This resource will only be given when the argument name is:
"ResourceArray",
// The resource will only be given when the type hint is:
PHPCensor\Plugin\Util\Factory::TYPE_ARRAY
);
};