本文整理匯總了PHP中Console::Error方法的典型用法代碼示例。如果您正苦於以下問題:PHP Console::Error方法的具體用法?PHP Console::Error怎麽用?PHP Console::Error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Console
的用法示例。
在下文中一共展示了Console::Error方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
function execute(InputInterface $input, OutputInterface $output)
{
$filename = $input->getArgument('filename');
$output->write("Processing '" . $filename . "'\n");
//TODO: Handle this through autoloading
$root = LinkORB_Core::GetPath("root");
$topic = new Topic();
$topic->name = 'Root';
if (!$topic->load($filename)) {
Console::Error("Unable to load map file.");
exit(1);
}
$topic->TopicL10N();
$output->write('DONE');
exit(0);
}
示例2: handle
/**
* notification of event occurence
* @access package private
* @param Event event the event to handle
*/
public function handle($event)
{
try {
if (is_callable($this->_callback)) {
call_user_func($this->_callback, $event);
} else {
Console::Error('Callback failed for event ' . $event->getEventType() . ' : not callable');
}
} catch (Exception $e) {
Console::Error('[Exception] in callback for event ' . $event->getEventType() . ' : ' . ' : ' . $e);
}
}
示例3: loadMap
function loadMap($filename)
{
if (!file_exists($filename)) {
Console::Error('Map file does not exist: ' . $filename);
return false;
}
$this->xml = @simplexml_load_file($filename);
if (!$this->xml) {
Console::Error('Incorrectly formatted XML in ' . $filename);
return false;
}
return $this->ParseMap($this->xml);
}