Timber\Core::import PHP Метод

import() публичный Метод

Takes an array or object and adds the properties to the parent object
public import ( array | object $info, $force = false )
$info array | object an object or array you want to grab data from to attach to the Timber object
    public function import($info, $force = false)
    {
        if (is_object($info)) {
            $info = get_object_vars($info);
        }
        if (is_array($info)) {
            foreach ($info as $key => $value) {
                if ($key === '' || ord($key[0]) === 0) {
                    continue;
                }
                if (!empty($key) && $force) {
                    $this->{$key} = $value;
                } else {
                    if (!empty($key) && !method_exists($this, $key)) {
                        $this->{$key} = $value;
                    }
                }
            }
        }
    }