require_once 'lib/base.php'; $editionString = \OC_Util::getEditionString(); echo $editionString; //Displays "Community 10.5.0"
require_once 'vendor/autoload.php'; use OC\Util; $editionString = Util::getEditionString(); echo $editionString;In this example, we use the getEditionString function from the Util class of ownCloud that is defined in the autoload.php file. The use of the \OC namespace and the vendor directory suggests that we are using Composer to manage our PHP packages. Therefore, we can assume that the OC_Util package comes with ownCloud's PHP SDK and is installed through Composer.