1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8namespace Tiki\Recommendation\Debug; 9 10use Tiki\Recommendation\EngineOutput; 11 12class SourceDocument implements EngineOutput 13{ 14 private $type; 15 private $object; 16 private $title; 17 18 function __construct($type, $object, $title = null) 19 { 20 $this->type = $type; 21 $this->object = $object; 22 $this->title = $title; 23 } 24 25 function __toString() 26 { 27 return tr('Source: %0:%1 (%2)', $this->type, $this->object, $this->title ?: tr('Unknown')); 28 } 29} 30