/**
  * {@inheritDoc}
  */
 public function getParentClasses($class)
 {
     if (!class_exists($class)) {
         throw MappingException::nonExistingClass($class);
     }
     return class_parents($class);
 }
Пример #2
0
 /**
  * Constructor
  *
  * @param string  $tagClassName
  * @param boolean $purge        whether to delete tags when entity is deleted
  */
 public function __construct($tagClassName, $purge = false)
 {
     if (!class_exists($tagClassName)) {
         throw MappingException::nonExistingClass($tagClassName);
     }
     $this->tag = new $tagClassName();
     if (!$this->tag instanceof TagInterface) {
         throw new \InvalidArgumentException(sprintf('Class "%s" must implement TagInterface.', $tagClassName));
     }
     $this->purge = $purge;
 }