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 online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

Application coding: Confused about this!

Jostein Rosenlund · ·
5:12 PM Friday, 13 December 2013
None
This is my function:
Located in "Media/com_easysocial/apps/user/evepos/models/apierror.php"

public function getItems( $userId ) {

$string = "https://api.eveonline.com/eve/ErrorList.xml.aspx";
$xml = simplexml_load_file($string);


foreach ($xml->result->rowset as $row) {
$count = $row->count();
};


$i = "0";
$arraynode ="1";
do {


$errorcode = "error_".$xml->result->rowset->row[0+$i]['errorCode'];
$this->set( $errorcode , $xml->result->rowset->row[0+$i]['errorText']);

$count = $count-1;
$arraynode = $arraynode+1;
$i = $i+1;

}

while ($count > 0);



}


}


in "Media/com_easysocial/apps/user/evepos/views/evepos.php"

Iv coded in

public function display( $userId )


{


$model = $this->getModel( 'apierrors' );
$result = $model->getitems( $userId );

echo $this->error_101;
}


This will put out an error message

Notice: Undefined property: EvePosViewCanvas::$error_101


What the function in the model does, is that it collects data from an api and put them into

$this->error_100 
$this->error101
$this->error102

and so on


What I want here, is to be able to echo $this->error101 in this case in canavas/view.html.php.

So what do i need to do in order to be able to use these values in views as well as in the application themes?
Do i have to write the foreach statement inside view.html.php ? or can i import the values from the module to views and themes somehow?
The replies under this section are restricted to logged in users or users with an active subscription with us