-Let's say you have a php file in "include/" that define a very useful class:\r
-\r
-```\r
- file: include/ItemsManager.php\r
- <?php\r
- namespace \Friendica;\r
- \r
- class ItemsManager {\r
- public function getAll() { ... }\r
- public function getByID($id) { ... }\r
- }\r
-```\r
-\r
-The class "ItemsManager" has been declared in "Friendica" namespace.\r
-Namespaces are useful to keep things separated and avoid names clash (could be that a library you want to use defines a class named "ItemsManager", but as long as is in another namespace, you don't have any problem)\r
-\r
-If we were using composer, we had configured it with path where to find the classes of "Friendica" namespace, and then the composer script will generate the autoloader machinery for us.\r
-As we don't use composer, we need check that the autoloader knows the Friendica namespace.\r
-So in "include/autoloader/autoload_psr4.php" there should be something like\r
-\r
-```\r
- $vendorDir = dirname(dirname(dirname(__FILE__)))."/library";\r
- $baseDir = dirname($vendorDir);\r
- return array(\r
- "Friendica" => array($baseDir."/include");\r
- );\r