| Server IP : 89.248.107.232 / Your IP : 216.73.217.70 Web Server : Apache System : Linux host2.kasilh.com 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64 User : seg ( 10005) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/seg-sa.es/peyco.es/wp-content/plugins/widgetkit-1/classes/ |
Upload File : |
<?php
/**
* @package Widgetkit
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
/*
Class: WidgetkitHelper
Helper base class
*/
class WidgetkitHelper implements ArrayAccess {
/* widgetkit instance */
public $widgetkit;
/* helper name */
protected $_name;
/*
Function: Constructor
Class Constructor.
*/
public function __construct($widgetkit) {
// set widgetkit
$this->widgetkit = $widgetkit;
// set default name
$this->_name = strtolower(basename(get_class($this), 'WidgetkitHelper'));
}
/*
Function: getName
Get helper name
Returns:
String
*/
public function getName() {
return $this->_name;
}
/*
Function: _call
Execute function call
Returns:
Mixed
*/
protected function _call($function, $args = array()) {
if (is_array($function)) {
list($object, $method) = $function;
if (is_object($object)) {
switch (count($args)) {
case 0 :
return $object->$method();
break;
case 1 :
return $object->$method($args[0]);
break;
case 2:
return $object->$method($args[0], $args[1]);
break;
case 3:
return $object->$method($args[0], $args[1], $args[2]);
break;
case 4:
return $object->$method($args[0], $args[1], $args[2], $args[3]);
break;
}
}
}
return call_user_func_array($function, $args);
}
/* ArrayAccess interface implementation */
public function offsetGet($name) {
return $this->widgetkit[$name];
}
public function offsetSet($name, $helper) {
$this->widgetkit[$name] = $helper;
}
public function offsetUnset($name) {
unset($this->widgetkit[$name]);
}
public function offsetExists($name) {
return !empty($this->widgetkit[$name]);
}
}