CodeExplorer generateMethodName example
$deprecation =
$definition->
getDeprecation($id);
$return[] =
sprintf('@deprecated %s',
($deprecation['package'
] ||
$deprecation['version'
] ? "Since {
$deprecation['package'
]} {
$deprecation['version'
]}: " : ''
).
$deprecation['message'
]);
} $return =
str_replace("\n * \n", "\n *\n",
implode("\n * ",
$return));
$return =
$this->container->
resolveEnvPlaceholders($return);
$shared =
$definition->
isShared() ? ' shared' : '';
$public =
$definition->
isPublic() ? 'public' : 'private';
$autowired =
$definition->
isAutowired() ? ' autowired' : '';
$asFile =
$this->asFiles && !
$this->inlineFactories && !
$this->
isHotPath($definition);
$methodName =
$this->
generateMethodName($id);
if ($asFile ||
$definition->
isLazy()) { $lazyInitialization = ', $lazyLoad = true';
} else { $lazyInitialization = '';
} $code = <<<EOF
/*{
$this->docStar
}
* Gets the
$public '
$id'
$shared$autowired service.
*
*
$shared =
$definition->
isShared() ? ' shared' : '';
$public =
$definition->
isPublic() ? 'public' : 'private';
$autowired =
$definition->
isAutowired() ? ' autowired' : '';
if ($definition->
isLazy()) { $lazyInitialization = '$lazyLoad = true';
} else { $lazyInitialization = '';
} $asFile =
$this->asFiles && !
$this->inlineFactories && !
$this->
isHotPath($definition);
$methodName =
$this->
generateMethodName($id);
if ($asFile) { $file =
$methodName.'.php';
$code = " // Returns the
$public '
$id'
$shared$autowired service.\n\n";
} else { $file = null;
$code = <<<EOF
/*{
$this->docStar
}
* Gets the
$public '
$id'
$shared$autowired service.
*
*
$return
$deprecation =
$definition->
getDeprecation($id);
$return[] =
sprintf('@deprecated %s',
($deprecation['package'
] ||
$deprecation['version'
] ? "Since {
$deprecation['package'
]} {
$deprecation['version'
]}: " : ''
).
$deprecation['message'
]);
} $return =
str_replace("\n * \n", "\n *\n",
implode("\n * ",
$return));
$return =
$this->container->
resolveEnvPlaceholders($return);
$shared =
$definition->
isShared() ? ' shared' : '';
$public =
$definition->
isPublic() ? 'public' : 'private';
$autowired =
$definition->
isAutowired() ? ' autowired' : '';
$asFile =
$this->asFiles && !
$this->inlineFactories && !
$this->
isHotPath($definition);
$methodName =
$this->
generateMethodName($id);
if ($asFile ||
$definition->
isLazy()) { $lazyInitialization = ', $lazyLoad = true';
} else { $lazyInitialization = '';
} $code = <<<EOF
/*{
$this->docStar
}
* Gets the
$public '
$id'
$shared$autowired service.
*
*