public function deleteClass(\core_kernel_classes_Class $clazz)
    {
        $returnValue = (bool) false;
        
        if ($clazz->isSubClassOf($this->getRootClass()) && ! $clazz->equals($this->getRootClass())) {
            $returnValue = true;
            
            $instances = $clazz->getInstances();
            foreach ($instances as $instance) {
                $this->deleteResource($instance);
            }
            
            $subclasses = $clazz->getSubClasses(false);
            foreach ($subclasses as $subclass) {
                $returnValue = $returnValue && $this->deleteClass($subclass);
            }
            foreach ($clazz->getProperties() as $classProperty) {
                $returnValue = $returnValue && $this->deleteClassProperty($classProperty);
            }
            $returnValue = $returnValue && $clazz->delete();
        } else {
            \common_Logger::w('Tried to delete class ' . $clazz->getUri() . ' as if it were a subclass of ' . $this->getRootClass()->getUri());
        }
        
        return (bool) $returnValue;
    }
public function deleteClass(\core_kernel_classes_Class $clazz)
    {
        $returnValue = (bool) false;
        
        if ($clazz->isSubClassOf($this->getRootClass()) && ! $clazz->equals($this->getRootClass())) {
            $returnValue = true;
            
            $instances = $clazz->getInstances();
            foreach ($instances as $instance) {
                $this->deleteResource($instance);
            }
            
            $subclasses = $clazz->getSubClasses(false);
            foreach ($subclasses as $subclass) {
                $returnValue = $returnValue && $this->deleteClass($subclass);
            }
            foreach ($clazz->getProperties() as $classProperty) {
                $returnValue = $returnValue && $this->deleteClassProperty($classProperty);
            }
            $returnValue = $returnValue && $clazz->delete();
        } else {
            \common_Logger::w('Tried to delete class ' . $clazz->getUri() . ' as if it were a subclass of ' . $this->getRootClass()->getUri());
        }
        
        return (bool) $returnValue;
    }
public function deleteClass ( \ core_kernel_classes_Class $ clazz ) { $ returnValue = ( bool ) false ; if ( $ clazz -> isSubClassOf ( $ this -> getRootClass ( ) ) && ! $ clazz -> equals ( $ this -> getRootClass ( ) ) ) { $ returnValue = true ; $ instances = $ clazz -> getInstances ( ) ; foreach ( $ instances as $ instance ) { $ this -> deleteResource ( $ instance ) ; } $ subclasses = $ clazz -> getSubClasses ( false ) ; foreach ( $ subclasses as $ subclass ) { $ returnValue = $ returnValue && $ this -> deleteClass ( $ subclass ) ; } foreach ( $ clazz -> getProperties ( ) as $ classProperty ) { $ returnValue = $ returnValue && $ this -> deleteClassProperty ( $ classProperty ) ; } $ returnValue = $ returnValue && $ clazz -> delete ( ) ; } else { \ common_Logger :: w ( 'Tried to delete class ' . $ clazz -> getUri ( ) . ' as if it were a subclass of ' . $ this -> getRootClass ( ) -> getUri ( ) ) ; } return ( bool ) $ returnValue ; }
Delete a subclass

@access public
@param \core_kernel_classes_Class $clazz
@return boolean
@throws \common_exception_Error
Delete a subclass