oont-contents/plugins/tamara-checkout/src/Traits/ConfigTrait.php
2025-02-08 15:10:23 +01:00

21 lines
350 B
PHP

<?php
namespace Tamara\Wp\Plugin\Traits;
trait ConfigTrait
{
/**
* @param array $config
*/
public function bindConfig($config)
{
foreach ((array)$config as $attrName => $attrValue) {
if (property_exists($this, $attrName)) {
$this->$attrName = $attrValue;
}
}
}
}