Subversion Repositories PHPX

Rev

Rev 45 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
27 PointedEar 1
<?php
2
 
3
/**
4
 * Basic registry class
5
 *
6
 * @author Thomas Lahn
7
 */
8
abstract class Registry
9
{
10
  /**
11
   * Data storage
12
   * @var array
13
   */
14
  protected static $_data = array();
15
 
16
  /**
17
   * Puts data in storage
18
   *
19
   * @param string $key
20
   * @param mixed $value
21
   */
22
  public static function set($key, $value)
23
  {
24
    self::$_data[$key] = $value;
25
  }
26
 
27
  /**
28
   * Gets data from storage
29
   *
30
   * @param string $key
31
   * @return mixed
32
   */
33
  public static function get($key)
34
  {
35
    return self::$_data[$key];
36
  }
37
}