UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

Application:

Jostein Rosenlund · ·
6:47 AM Saturday, 21 December 2013
None
This is the current code, that iv inserted into:

My Model Looks like this:

class phealModel extends EasySocialModel

{
public function getList( $userId ) {

$path = realpath(".")."/media/com_easysocial/apps/user/epoma/vendor/autoload.php";
require_once $path;

//import namespace
use Pheal\Pheal;

// create pheal object with default values
// so far this will not use caching, and since no key is supplied
// only allow access to the public parts of the EVE API
$pheal = new Pheal();

// requests /server/ServerStatus.xml.aspx
$response = $pheal->serverScope->ServerStatus();

echo sprintf(
"Hello Visitor! The EVE Online Server is: %s!, current amount of online players: %s",
$response->serverOpen ? "open" : "closed",
$response->onlinePlayers
);

}}

"]


But i have an issue implementing the use into the code.
use Pheal\Pheal;

It prints out the following error.

Parse error: syntax error, unexpected 'use' (T_USE) in /media/com_easysocial/apps/user/epoma/models/pheal.php on line 52

How can i fix this?

sourcecode for the includes can be found here:
https://github.com/3rdpartyeve/phealng

fixed it:

Foundry::import( 'admin:/includes/model' );


$path = realpath(".")."/media/com_easysocial/apps/user/epoma/vendor/autoload.php";
require_once $path;
use Pheal\Pheal;


class phealModel extends EasySocialModel

{




public function getList( $userId ) {


//import namespace


// create pheal object with default values
// so far this will not use caching, and since no key is supplied
// only allow access to the public parts of the EVE API
$pheal = new Pheal();

// requests /server/ServerStatus.xml.aspx
$response = $pheal->serverScope->ServerStatus();

echo sprintf(
"Hello Visitor! The EVE Online Server is: %s!, current amount of online players: %s",
$response->serverOpen ? "open" : "closed",
$response->onlinePlayers
);

}}
The replies under this section are restricted to logged in users or users with an active subscription with us