dir/example.php

15 lines
402 B
PHP
Raw Normal View History

2014-10-11 00:24:17 +02:00
<?php
2014-10-11 00:37:41 +02:00
//Add the auto loader. This makes sure that we can find the files we need for a class.
require_once('vendor/autoload.php');
2014-10-11 00:24:17 +02:00
2014-10-11 00:37:41 +02:00
//This says, we want Hello to mean Friendica\Directory\Example\Hello.
//It's a shortcut.
2014-10-11 00:24:17 +02:00
use Friendica\Directory\Example\Hello;
2014-10-11 00:37:41 +02:00
//Here we use the shortcut and create a new Hello object.
2014-10-11 00:24:17 +02:00
$instance = new Hello();
2014-10-11 00:37:41 +02:00
//Let the Hello object call
2014-10-11 00:24:17 +02:00
echo $instance->sayHello();