00001 <?php 00010 final class response { 00011 00017 private static $inst; 00018 00024 private static $proxy; 00025 00031 public static function getInstance() { 00032 if (self::$proxy) 00033 return self::$proxy; 00034 if (!self::$inst) { 00035 self::$inst = factory::get('response_'.request::getResponseName()); 00036 self::$inst->setContentType(request::get('out')); 00037 } 00038 return self::$inst; 00039 } 00040 00046 public static function setProxy($proxy) { 00047 self::$proxy = $proxy; 00048 } 00049 00055 public static function getProxy() { 00056 return self::$proxy; 00057 } 00058 00062 public static function clearProxy() { 00063 self::$proxy = null; 00064 } 00065 }
1.7.1