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

get pure value
public getPure ( string $name, mixed $default = null ) : mixed
$name string variable name
$default mixed default value
Результат mixed
Пример #1
0
 /**
  * convey to descendants
  *
  * @param ConfigEntity $config config instance
  * @param callable     $filter filter function
  * @param array        $items  item key list
  * @return void
  */
 protected function convey(ConfigEntity $config, callable $filter = null, array $items = null)
 {
     $descendants = $this->repo->fetchChildren($config->siteKey, $config->name);
     /** @var ConfigEntity $descendant */
     foreach ($descendants as $descendant) {
         if ($filter === null || call_user_func($filter, $descendant) === true) {
             if ($items === null) {
                 $descendant->clear();
             } else {
                 foreach ($items as $item) {
                     $val = $config->getPure($item);
                     if ($val instanceof Closure) {
                         continue;
                     }
                     $descendant->set($item, $val);
                 }
             }
             $this->repo->save($descendant);
         }
     }
 }