. * * @category Microapp * @package StatusNet * @author Evan Prodromou * @copyright 2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ if (!defined('STATUSNET')) { // This check helps protect against security problems; // your code file can't be executed directly from the web. exit(1); } /** * For use by microapps to customize NoticeListItem output * * @category Microapp * @package StatusNet * @author Evan Prodromou * @copyright 2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ class NoticeListItemAdapter { protected $nli; /** * Wrap a notice list item. * * @param NoticeListItem $nli item to wrap */ function __construct($nli) { $this->nli = $nli; } /** * Delegate unimplemented methods to the notice list item attribute. * * @param string $name Name of the method * @param array $arguments Arguments called * * @return mixed Return value of the method. */ function __call($name, $arguments) { return call_user_func_array(array($this->nli, $name), $arguments); } function __get($name) { return $this->nli->$name; } }