/**
  * Construct a new awgraph
  *
  * @param int $width Graph width
  * @param int $height Graph height
  * @param string $name Graph name for the cache (must be unique). Let it null to not use the cache.
  * @param int $timeout Cache timeout (unix timestamp)
  */
 public function __construct($width = NULL, $height = NULL, $name = NULL, $timeout = 0)
 {
     parent::__construct();
     $this->setSize($width, $height);
     if (ARTICHOW_CACHE) {
         $this->name = $name;
         $this->timeout = $timeout;
         // Clean sometimes all the cache
         if (mt_rand(0, 5000) === 0) {
             awGraph::cleanCache();
         }
         if ($this->name !== NULL) {
             $file = ARTICHOW . "/cache/" . $this->name . "-time";
             if (is_file($file)) {
                 $type = awGraph::cleanGraphCache($file);
                 if ($type === NULL) {
                     awGraph::deleteFromCache($this->name);
                 } else {
                     header("Content-Type: image/" . $type);
                     readfile(ARTICHOW . "/cache/" . $this->name . "");
                     exit;
                 }
             }
         }
     }
     $this->title = new awLabel(NULL, new awTuffy(16), NULL, 0);
     $this->title->setAlign(awLabel::CENTER, awLabel::BOTTOM);
 }
 /**
  * Construct a new awAntiSpam image
  *
  * @param string $string A string to display
  */
 public function __construct($string = '')
 {
     parent::__construct();
     $this->string = (string) $string;
 }