Ferreteria/v0.5/registry/feature: Difference between revisions
< Ferreteria | v0.5 | registry
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Feature registration== | ==Feature registration== | ||
{{l/ver|Feature}} registration | {{l/ver|Feature}} registration for non-{{l/ver|Dropin}} classes from {{l/ferreteria/code|config/portable/features.php}}: | ||
<syntaxhighlight lang=php> | <syntaxhighlight lang=php> | ||
class | class csSetup { | ||
static public function OnSetup() { | static public function OnSetup() { | ||
$oReg = caFeature::FeatureClassRegistry(); | $oReg = FD\caFeature::FeatureClassRegistry(); | ||
$oReg->AddFeature(account\cFeature::class); | |||
$oReg->AddFeature(FU\account\cFeature::class); | |||
$oReg->AddFeature(FU\client\cFeature::class); | |||
$oReg->AddFeature(FU\perm\cFeature::class); | |||
$oReg->AddFeature(FU\session\cFeature::class); | |||
$oReg->AddFeature(FDN\cFeature::class); | |||
} | } | ||
}</syntaxhighlight> | |||
</syntaxhighlight> | |||
For an example of how the Registry | For an example of how to read the Feature Registry, see <code>cDropinLink::InvokeFeature()</code>. |
Revision as of 16:37, 8 March 2022
Feature registration
Feature registration for non-Dropin classes from config/portable/features.php:
class csSetup {
static public function OnSetup() {
$oReg = FD\caFeature::FeatureClassRegistry();
$oReg->AddFeature(FU\account\cFeature::class);
$oReg->AddFeature(FU\client\cFeature::class);
$oReg->AddFeature(FU\perm\cFeature::class);
$oReg->AddFeature(FU\session\cFeature::class);
$oReg->AddFeature(FDN\cFeature::class);
}
}
For an example of how to read the Feature Registry, see cDropinLink::InvokeFeature()
.