/**
* @param string $serviceVariableName
* @param MethodModel $method
* @return Tutorial
*/
protected function addContentFromMethod($serviceVariableName, MethodModel $method)
{
$this->getFile()->getMainElement()->addChild(sprintf('if ($%s->%s(%s) !== false) {', $serviceVariableName, $method->getMethodName(), $this->getMethodParameters($method)))->addChild($this->getFile()->getMainElement()->getIndentedString(sprintf('print_r($%s->getResult());', $serviceVariableName), 1))->addChild('} else {')->addChild($this->getFile()->getMainElement()->getIndentedString(sprintf('print_r($%s->getLastError());', $serviceVariableName), 1))->addChild('}');
return $this;
}