Hello, I have an array in a log.phtml, ie:
<?php
//application/logmessage/log.phtml//
require_once 'Zend/Log.php';
require_once 'Zend/Log/Writer/Stream.php';
class Logger {
/**
* Array variable store full file back trace information.
*
* @access protected
*/
protected $backTrace = array();
/**
* Array variable store full message information.
*
* @access protected
*/
protected $messageInfo = array();
/**
* Constructor: loads the debug and error logs.
*
*/
public function __construct( $type, $msg ) {
$mock = new Zend_Log_Writer_Mock;
$logger = new Zend_Log( $mock );
$logger->$type( $msg );
// Get full message information.
array_push( $this->messageInfo, $mock->events[0] );
// Get full information of file, from where the message come.
array_push( $this->backTrace, debug_backtrace() );
// Set all required informationn in their respective variables.
$messageText = $this->messageInfo[0]["message"];
$priority = $this->messageInfo[0]["priorityName"];
$backTraceFile = $this->backTrace[0][0]["file"];
$backTraceLine = $this->backTrace[0][0]["line"];
$logArray = array( "Message" => $messageText, "Priority" => $priority,
"Line" => $backTraceLine, "File" => $backTraceFile );
}
}
?>
Now i want to display the $logArray array along with form, my form file is like:
<?php
//application/views/scripts/miscellaneous/index.phtml//
//require_once('../application/logmessage/log.phtml');
echo $this->form;
?>
How could i display Log array with form ....?
How could i return $logArray() from " application/logmessage/log.phtml " to " application/views/scripts/miscellaneous/index.phtml "