Ferreteria/v0.5/registry/feature

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | registry
Revision as of 13:35, 8 March 2022 by htyp>Woozle (Created page with "==Feature registration== Feature registration (incomplete) from /login/base/stocker.php: <syntaxhighlight lang=php> class csStocker extends FD\csaStocker { static public f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Feature registration

Feature registration (incomplete) from /login/base/stocker.php:

class csStocker extends FD\csaStocker {
    static public function OnPreLoad() {
        $oReg = caFeature::FeatureClassRegistry();
        $oReg->AddFeature(account\cFeature::class);
        $oReg->AddFeature(client\cFeature::class);
        $oReg->AddFeature(session\cFeature::class);
        // IN PROGRESS
    }
 
    static public function Accounts()      : caFeature { return self::FetchFeature(account\cFeature::SpecSlug()); }
    static public function AcctXGroup()    : caFeature { return self::FetchFeature(ctGroupsForAcct::SpecSlug()); }
    static public function Clients()       : caFeature { return self::FetchFeature(client\cFeature::SpecSlug()); }
    static public function Groups()        : caFeature { return self::FetchFeature(ctGroups::SpecSlug()); }
    static public function Permits()       : caFeature { return self::FetchFeature(ctPermits::SpecSlug()); }
    static public function PermitsQuery()  : caFeature { return self::FetchFeature(cqtPermits::SpecSlug()); }
    static public function Sessions()      : caFeature { return self::FetchFeature(session\cFeature::SpecSlug()); }
    
    static public function AccountsFetcher() : FD\cSelectFetcher {
      return self::MakeObject(account\cFetcher::class); }
}