/** * Returns an new app node instance. * * @param \TechDivision\Application\Interfaces\ApplicationInterface $application The application to create a new app node instance from * * @return \TechDivision\ApplicationServer\Api\Node\AppNode The app node representation of the application */ protected function create(ApplicationInterface $application) { // create a new AppNode and initialize it with the values from this instance $appNode = new AppNode(); $appNode->setNodeName(AppService::NODE_NAME); $appNode->setUuid($appNode->newUuid()); $appNode->setName($application->getName()); $appNode->setWebappPath($application->getWebappPath()); $appNode->setDatasources($application->getDatasources()); // return the AppNode instance return $appNode; }