Ejemplo n.º 1
0
 /**
  * Checks if the object can be set in this fieldset
  *
  * @param object $object
  * @return bool
  */
 public function allowObjectBinding($object)
 {
     $validBindingClass = false;
     if (is_object($object) && $this->allowedObjectBindingClass()) {
         $objectClass = ltrim($this->allowedObjectBindingClass(), '\\');
         $reflection = new ClassReflection($object);
         $validBindingClass = $reflection->getName() == $objectClass || $reflection->isSubclassOf($this->allowedObjectBindingClass());
     }
     return $validBindingClass || $this->object && $object instanceof $this->object;
 }