$pluginPath = PATH_PLUGINS . '/MyPlugin'; $plugin = Gdn::factoryInstall('Plugin', $pluginPath);
$themePath = PATH_THEMES . '/MyTheme'; $theme = Gdn::factoryInstall('Theme', $themePath);
$libPath = PATH_LIBRARY . '/MyLibrary'; $lib = Gdn::factoryInstall('Library', $libPath);In this example, we are installing a library package located in the directory at PATH_LIBRARY/MyLibrary. We use the Gdn::factoryInstall method to instantiate a new Library object and install it in the system. Overall, the Gdn FactoryInstall method is used to create and install packages in Vanilla PHP framework. The package library can vary depending on the type of package being installed, such as plugins, themes, or libraries.