Doctrine\OXM\Tools\XmlEntityGenerator::setUpdateXmlEntityIfExists PHP 메소드

setUpdateXmlEntityIfExists() 공개 메소드

Set whether or not to try and update the xml-entity if it already exists
public setUpdateXmlEntityIfExists ( boolean $bool ) : void
$bool boolean
리턴 void
    public function setUpdateXmlEntityIfExists($bool)
    {
        $this->updateXmlEntityIfExists = $bool;
    }

Usage Example

 protected function getXmlEntityGenerator()
 {
     $xmlEntityGenerator = new XmlEntityGenerator();
     $xmlEntityGenerator->setGenerateAnnotations(false);
     $xmlEntityGenerator->setGenerateStubMethods(true);
     $xmlEntityGenerator->setRegenerateXmlEntityIfExists(false);
     $xmlEntityGenerator->setUpdateXmlEntityIfExists(true);
     $xmlEntityGenerator->setNumSpaces(4);
     return $xmlEntityGenerator;
 }