| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /home/udaipurk/www/websites/rishhh/wp-content/plugins/et-core-plugin/core/ |
| Current File : //home/udaipurk/www/websites/rishhh/wp-content/plugins/et-core-plugin/core/model.php |
<?php
namespace ETC\Core;
/**
* Abstract class to define/implement base methods for model classes
*
* @since 1.4.4
* @package ETC
* @subpackage ETC/models
*/
class Model {
use base;
/**
* Provides access to a single instance of a module.
*
* @since 1.0.0
* @return object
*/
public static function get_instance() {
$classname = get_called_class();
$instance = self::get( $classname );
if ( null === $instance ) {
$instance = new $classname();
self::set( $classname, $instance );
}
return $instance;
}
}