<?php

class Pampa_Projeto {

  private $modelProjectsLogs;

  /**
   * Singleton instance
   * @var Pampa_Log
   */
  protected static $_instance = null;

  protected function __construct() {

  }

  /**
   * Returns an instance of Frk_Auth_Site
   * Singleton pattern implementation
   * @return Pampa_Log Provides a fluent interface
   */
  public static function getInstance() {
    if (null === self::$_instance) {
      self::$_instance = new Pampa_Projeto();
      self::$_instance->modelProjectsLogs = new Model_Projects_Logs();
    }

    return self::$_instance;
  }

  public static function log($projectId, $type = 3, $text = NULL)
  {
    $self = self::getInstance();

    // add to db
    $self->modelProjectsLogs->add($projectId, $type, $text);
  }

}