Skip to content

Registry for classes

Latest
Compare
Choose a tag to compare
@danielgolub danielgolub released this 28 Nov 20:35
· 3 commits to master since this release

Classes Registry using the Singleton Pattern

Now Codengine makes a faster and more stable experience for all of us. Documentation has updated accordingly.

Partial backward compatibility. Few things to change:

  • Each controller has a default __construct() function which contain a fixed code. Please change it to the following:

    public function __construct()
    {
        $registry = Registry::getInstance();
        foreach (reset($registry) as $key => $value) { $this->{$key} = $value; }
    }
    
  • If you have created a custom base class, please use the new registry (set, get) for faster experience with your application.