// Load the product list class and get a category-specific instance $productList = JLoader::load('Joomla\CMS\Component\ProductList'); $list = $productList->getList('category', $categoryId);
// Load the blog post class and get a keyword-specific instance $postList = JLoader::load('Joomla\CMS\Component\PostList'); $list = $postList->getList('keyword', $keywordId);
// Load the event class and get a filtered instance $eventList = JLoader::load('Joomla\CMS\Component\EventList'); $filter = array('upcoming' => true); $list = $eventList->getList(null, null, $filter);In each of these examples, we are using a different package or library to access the data source and retrieve the list of items. Depending on the tool you are using to build your PHP application, you may have access to different packages for working with different types of data sources.