public function validateClassName($document, $className)
    {
        if (isset($className) && $this->validateDocumentName) {
            $this->documentClassMapper->validateClassName($this->dm, $document, $className);
        }
    }
public function validateClassName($document, $className)
    {
        if (isset($className) && $this->validateDocumentName) {
            $this->documentClassMapper->validateClassName($this->dm, $document, $className);
        }
    }
public function validateClassName ( $ document , $ className ) { if ( isset ( $ className ) && $ this -> validateDocumentName ) { $ this -> documentClassMapper -> validateClassName ( $ this -> dm , $ document , $ className ) ; } }
Validate if a document is of the specified class, if the global setting
to validate is activated.

@param object      $document
@param string|null $className The class name $document must be
instanceof. Pass empty to not validate anything.

@throws PHPCRException
Validate if a document is of the specified class if the global setting to validate is activated .