| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/c/o/o/coopiak/www/cj79373/components/com_engage/Model/Struct/ |
Upload File : |
<?php
/**
* @package AkeebaEngage
* @copyright Copyright (c)2020-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Akeeba\Engage\Site\Model\Struct;
use ReflectionObject;
use ReflectionProperty;
/**
* Structure LoadedTemplate
*
* @package Akeeba\Engage\Site\Model\Struct
*
* @property string|null $subject The email subject loaded
* @property string|null $template The email body loaded
* @property string|null $loadedLanguage The actual language we loaded (can be '*')
*
* @see \Akeeba\Engage\Site\Helper\Email
*/
final class LoadedTemplate
{
private $subject;
private $template;
private $loadedLanguage;
public function __construct(array $params = [])
{
foreach ($params as $k => $v)
{
$this->__set($k, $v);
}
}
public function toArray(): array
{
$ret = [];
$refObject = new ReflectionObject($this);
foreach ($refObject->getProperties(ReflectionProperty::IS_PRIVATE) as $property)
{
$ret[$property->name] = $this->{$property->name};
}
return $ret;
}
public function __get($name)
{
if (!property_exists($this, $name))
{
return null;
}
return $this->{$name};
}
public function __set($name, $value)
{
if (!property_exists($this, $name))
{
return;
}
$this->{$name} = (string) $value;
}
}