<?php

class AdcWidget extends WP_Widget{
	protected $api = false;
	
	function __construct($id_base, $name, $widget_options = array(), $control_options = array())
	{
		parent::__construct($id_base, $name, $widget_options, $control_options);
 		$this->api = AdcPlugin::getAPI();
        add_action( 'wp_head', array($this, "addHead"));
        add_filter( 'document_title_parts', array($this, "pageTitle"));        
	}

    public function addHead()
    {
    }

    public function error($text = "")
    {
 		$view = new View("error");
 		$view->setVar("message", $text);
 		return $view->fetch();
    }
    function pageTitle($title)
    {
        return $title;
    }


	function getSettings()
	{
 		return AdcPlugin::settings();
	}


}