Doctrine\OXM\Tools\XmlEntityGenerator::generateLifecycleCallbackMethod PHP Method

generateLifecycleCallbackMethod() private method

private generateLifecycleCallbackMethod ( $name, $methodName, $metadata )
    private function generateLifecycleCallbackMethod($name, $methodName, $metadata)
    {
        if ($this->hasMethod($methodName, $metadata)) {
            return;
        }
        $replacements = array('<comment>' => $this->generateAnnotations ? '/** @OXM\\' . ucfirst($name) . ' */' : '', '<methodName>' => $methodName);
        $method = str_replace(array_keys($replacements), array_values($replacements), self::$lifecycleCallbackMethodTemplate);
        return $this->prefixCodeWithSpaces($method);
    }