/**
  * Constructor
  */
 public function __construct()
 {
     if (self::$instance !== null) {
         throw new Exception(__CLASS__ . ": singleton required");
     }
     self::$instance = $this;
     parent::__construct();
 }
Exemple #2
0
 /**
  * Must be placed in order of priority with
  * regards to searching locations.
  */
 protected function registerDefaultStorages()
 {
     $this->codeStore[] = MW_WidgetCodeStorage_Database::gs();
     $this->codeStore[] = MW_WidgetCodeStorage_Repository::gs();
     return $this;
 }
<?php

/**
 * @author Jean-Lou Dupont
 * @package SecureWidgets
 * @version @@package-version@@
 * @Id $Id$
 */
//<source lang=php>
MW_WidgetCodeStorage_Repository::getInstance('MW_WidgetCodeStorage_Repository')->setMessages(array('en' => array('securewidgets-csrepo' => 'SecureWidgets - SVN Repository', 'securewidgets-csrepo-not-found' => 'code not in the SVN repository.', 'securewidgets-csrepo-error-feed' => 'error fetching widget feed list.', 'securewidgets-csrepo-widget-not-found' => "widget by the name <i>\$1</i> was not found in the SVN repository.", 'securewidgets-csrepo-error-code-fetch' => "error fetching code for widget <i>\$1</i> from SVN repository.")));
//</source>