/**
* createFromPlaceholder extracts the methods of a placeholder that can be called from a template.
*
* Methods must be public and take a Call object as the first argument.
*
* @return \nochso\WriteMe\Reflection\Method[]
*/
public function createFromPlaceholder(Placeholder $placeholder)
{
$methods = [];
$class = Reflection\ReflectionClass::createFromInstance($placeholder);
foreach ($class->getMethods() as $method) {
if ($this->isCallable($method)) {
$methods[] = new Method($placeholder, $method);
}
}
return $methods;
}