//require MediaWiki's autoloader require_once __DIR__ . '/vendor/autoload.php'; //create a new article object based on its title $title = Title::newFromText('Example article'); $article = Article::newFromTitle($title); //display article content echo $article->getContent();
//require MediaWiki's autoloader require_once __DIR__ . '/vendor/autoload.php'; //create a new category object based on its title $title = Title::newFromText('Example category'); $category = Category::newFromTitle($title); //display all pages belonging to this category $pageList = $category->getPageList(); echo implode('In summary, newFromTitle is a PHP method used to create instances of specific page categories based on their titles. It is commonly used in the MediaWiki library, among other PHP libraries, to build content management systems and websites.
', $pageList);