Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
core_calendar\local\event\proxies\std_proxy Class Reference

stdClass proxy. More...

Inheritance diagram for core_calendar\local\event\proxies\std_proxy:
core_calendar\local\event\proxies\proxy_interface

Public Member Functions

 __construct ($id, callable $callback, stdClass $base=null)
 Constructor. More...
 
 get ($member)
 Retrieve a member of the proxied class. More...
 
 get_proxied_instance ()
 Get the full instance of the proxied class. More...
 

Protected Attributes

stdClass $base
 $base Base class to get members from.
 
callable $callback
 $callback Callback to run which will load the class to proxy.
 
array $callbackargs
 $callbackargs Array of arguments to pass to the callback.
 
stdClass $class
 $class The class we are proxying.
 
int $id
 $id The ID of the database record.
 

Detailed Description

stdClass proxy.

This class is intended to proxy things like user, group, etc 'classes' It will only run the callback to load the object from the DB when necessary.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_calendar\local\event\proxies\std_proxy::__construct (   $id,
callable  $callback,
stdClass  $base = null 
)

Constructor.

Parameters
int$idThe ID of the record in the database.
callable$callbackCallback to load the class.
stdClass$baseClass containing base values.

Member Function Documentation

◆ get()

core_calendar\local\event\proxies\std_proxy::get (   $member)

Retrieve a member of the proxied class.

Parameters
string$memberThe name of the member to retrieve
Exceptions
core_calendar

Implements core_calendar\local\event\proxies\proxy_interface.

◆ get_proxied_instance()

core_calendar\local\event\proxies\std_proxy::get_proxied_instance ( )

Get the full instance of the proxied class.

Return values
stdClass

Implements core_calendar\local\event\proxies\proxy_interface.


The documentation for this class was generated from the following file: