Doctrine\ODM\MongoDB\Tools\DocumentGenerator::setGenerateStubMethods PHP Method

setGenerateStubMethods() public method

Set whether or not to generate stub methods for the document
public setGenerateStubMethods ( boolean $bool ) : void
$bool boolean
return void
    public function setGenerateStubMethods($bool)
    {
        $this->generateDocumentStubMethods = $bool;
    }

Usage Example

 /**
  * @return \Doctrine\ODM\MongoDB\Tools\DocumentGenerator
  */
 protected function getDocumentGenerator()
 {
     $documentGenerator = new DocumentGenerator();
     $documentGenerator->setGenerateAnnotations(true);
     $documentGenerator->setGenerateStubMethods(true);
     $documentGenerator->setRegenerateDocumentIfExists(false);
     $documentGenerator->setUpdateDocumentIfExists(true);
     $documentGenerator->setNumSpaces(4);
     return $documentGenerator;
 }
All Usage Examples Of Doctrine\ODM\MongoDB\Tools\DocumentGenerator::setGenerateStubMethods