]> git.mxchange.org Git - friendica.git/blobdiff - doc/autoloader.md
Merge pull request #10889 from MrPetovan/task/10886-bbcode-remove-class
[friendica.git] / doc / autoloader.md
index 29d3a005fdb0c1fc9f2aa9cf678353e2098d68cb..e1588688f187443066396031e2be023205957efe 100644 (file)
@@ -47,8 +47,10 @@ The code will be something like:
 // mod/network.php
 <?php
 
+use Friendica\App;
+
 function network_content(App $a) {
-       $itemsmanager = new Friendica\ItemsManager();
+       $itemsmanager = new \Friendica\ItemsManager();
        $items = $itemsmanager->getAll();
 
        // pass $items to template
@@ -117,6 +119,8 @@ If your code is in same namespace as the class you need, you don't need to prepe
 
 namespace Friendica;
 
+use Friendica\Protocol\DFRN;
+
 // this is the same content of current include/delivery.php,
 // but has been declared to be in "Friendica" namespace