protected function _parents($current = false) { $instances = []; $instance = $current ? $this : $this->_parent; while ($instance !== null) { $instances[] = $instance; $instance = $instance->_parent; } return array_reverse($instances); }