public function __clone() { parent::__clone(); // Clear or re-bind cached delegate bindings as they are scoped to the container. if (method_exists('Closure', 'bindTo')) { foreach ($this as $v) { if ($v instanceof DelegateBinding) { $v->bindCallback($this); } } } else { foreach ($this as $k => $v) { if ($v instanceof DelegateBinding) { $this->{$k} = NULL; } } } }
public function __debugInfo() { return array_merge(parent::__debugInfo(), ['bindingCount' => count($this->bindings)]); }