예제 #1
0
 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;
             }
         }
     }
 }
예제 #2
0
 public function __debugInfo()
 {
     return array_merge(parent::__debugInfo(), ['bindingCount' => count($this->bindings)]);
 }