protected function create_app_class(NameResolverInterface $name_resolver) { $class_name = $name_resolver->get_alias() . 'App'; $class_namespace = substr($name_resolver->get_class_namespace(), 1); $file_path = $this->filemanager()->get_path_to_vendor_folder() . $name_resolver->get_class_directory() . DIRECTORY_SEPARATOR . $class_name . '.php'; $file_contents = <<<PHP <?php namespace {$class_namespace}; \t\t\t\t class {$class_name} extends \\exface\\Core\\CommonLogic\\AbstractApp { \t }\t PHP; $this->filemanager()->dumpFile($file_path, $file_contents); }
public function get_app_absolute_path(NameResolverInterface $app_name_resolver) { $app_path = $this->get_app()->filemanager()->get_path_to_vendor_folder() . $app_name_resolver->get_class_directory(); if (!file_exists($app_path) || !is_dir($app_path)) { throw new ActionRuntimeException('"' . $app_path . '" does not point to an installable app!'); } return $app_path; }