Add some code comments to the example.
This commit is contained in:
parent
9bafa316d4
commit
8cc61e0c68
1 changed files with 6 additions and 0 deletions
|
@ -1,8 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
//Add the auto loader. This makes sure that we can find the files we need for a class.
|
||||||
require_once('autoload.php');
|
require_once('autoload.php');
|
||||||
|
|
||||||
|
//This says, we want Hello to mean Friendica\Directory\Example\Hello.
|
||||||
|
//It's a shortcut.
|
||||||
use Friendica\Directory\Example\Hello;
|
use Friendica\Directory\Example\Hello;
|
||||||
|
|
||||||
|
//Here we use the shortcut and create a new Hello object.
|
||||||
$instance = new Hello();
|
$instance = new Hello();
|
||||||
|
|
||||||
|
//Let the Hello object call
|
||||||
echo $instance->sayHello();
|
echo $instance->sayHello();
|
||||||
|
|
Loading…
Add table
Reference in a new issue