src/Common/Controller/Base.php
public static function backwardsCompatibility(&$oBindTo)
    {
        /**
         * Backwards compatibility
         * Various older modules expect to be able to access a few services/models
         * via magic methods. These will be deprecated soon.
         */

        //  @todo (Pablo - 2017-06-07) - Remove these
        $oBindTo->db                  = Factory::service('Database');
        $oBindTo->input               = Factory::service('Input');
        $oBindTo->output              = Factory::service('Output');
        $oBindTo->meta                = Factory::service('Meta');
        $oBindTo->asset               = Factory::service('Asset');
        $oBindTo->encrypt             = Factory::service('Encrypt');
        $oBindTo->logger              = Factory::service('Logger');
        $oBindTo->uri                 = Factory::service('Uri');
        $oBindTo->security            = Factory::service('Security');
        $oBindTo->emailer             = Factory::service('Emailer', 'nails/module-email');
        $oBindTo->event               = Factory::service('Event', 'nails/module-event');
        $oBindTo->session             = Factory::service('Session', 'nails/module-auth');
        $oBindTo->user                = Factory::model('User', 'nails/module-auth');
        $oBindTo->user_group_model    = Factory::model('UserGroup', 'nails/module-auth');
        $oBindTo->user_password_model = Factory::model('UserPassword', 'nails/module-auth');

        //  Set variables for the views, too
        $oBindTo->data['user']          = $oBindTo->user;
        $oBindTo->data['user_group']    = $oBindTo->user_group_model;
        $oBindTo->data['user_password'] = $oBindTo->user_password_model;
    }
public static function backwardsCompatibility(&$oBindTo)
    {
        /**
         * Backwards compatibility
         * Various older modules expect to be able to access a few services/models
         * via magic methods. These will be deprecated soon.
         */

        //  @todo (Pablo - 2017-06-07) - Remove these
        $oBindTo->db                  = Factory::service('Database');
        $oBindTo->input               = Factory::service('Input');
        $oBindTo->output              = Factory::service('Output');
        $oBindTo->meta                = Factory::service('Meta');
        $oBindTo->asset               = Factory::service('Asset');
        $oBindTo->encrypt             = Factory::service('Encrypt');
        $oBindTo->logger              = Factory::service('Logger');
        $oBindTo->uri                 = Factory::service('Uri');
        $oBindTo->security            = Factory::service('Security');
        $oBindTo->emailer             = Factory::service('Emailer', 'nails/module-email');
        $oBindTo->event               = Factory::service('Event', 'nails/module-event');
        $oBindTo->session             = Factory::service('Session', 'nails/module-auth');
        $oBindTo->user                = Factory::model('User', 'nails/module-auth');
        $oBindTo->user_group_model    = Factory::model('UserGroup', 'nails/module-auth');
        $oBindTo->user_password_model = Factory::model('UserPassword', 'nails/module-auth');

        //  Set variables for the views, too
        $oBindTo->data['user']          = $oBindTo->user;
        $oBindTo->data['user_group']    = $oBindTo->user_group_model;
        $oBindTo->data['user_password'] = $oBindTo->user_password_model;
    }
public static function backwardsCompatibility ( & $ oBindTo ) { /**
         * Backwards compatibility
         * Various older modules expect to be able to access a few services/models
         * via magic methods. These will be deprecated soon.
         */ //  @todo (Pablo - 2017-06-07) - Remove these $ oBindTo -> db = Factory :: service ( 'Database' ) ; $ oBindTo -> input = Factory :: service ( 'Input' ) ; $ oBindTo -> output = Factory :: service ( 'Output' ) ; $ oBindTo -> meta = Factory :: service ( 'Meta' ) ; $ oBindTo -> asset = Factory :: service ( 'Asset' ) ; $ oBindTo -> encrypt = Factory :: service ( 'Encrypt' ) ; $ oBindTo -> logger = Factory :: service ( 'Logger' ) ; $ oBindTo -> uri = Factory :: service ( 'Uri' ) ; $ oBindTo -> security = Factory :: service ( 'Security' ) ; $ oBindTo -> emailer = Factory :: service ( 'Emailer' , 'nails/module-email' ) ; $ oBindTo -> event = Factory :: service ( 'Event' , 'nails/module-event' ) ; $ oBindTo -> session = Factory :: service ( 'Session' , 'nails/module-auth' ) ; $ oBindTo -> user = Factory :: model ( 'User' , 'nails/module-auth' ) ; $ oBindTo -> user_group_model = Factory :: model ( 'UserGroup' , 'nails/module-auth' ) ; $ oBindTo -> user_password_model = Factory :: model ( 'UserPassword' , 'nails/module-auth' ) ; //  Set variables for the views, too $ oBindTo -> data [ 'user' ] = $ oBindTo -> user ; $ oBindTo -> data [ 'user_group' ] = $ oBindTo -> user_group_model ; $ oBindTo -> data [ 'user_password' ] = $ oBindTo -> user_password_model ; }
Provides some backwards compatability

@param \stdClass $oBindTo The class to bind to
Provides some backwards compatability