Exemplo n.º 1
0
 function __construct()
 {
     Log::__construct();
     Log::Location();
     $this->SetServer();
     $this->MemberIsRank();
 }
 public function __construct($var)
 {
     gen_time('class/UrlTranslator');
     parent::__construct();
     $this->rules = $var;
     $this->args = self::rest_url_translator();
 }
Exemplo n.º 3
0
 public function __construct($error_file_name, $registry)
 {
     parent::__construct($error_file_name);
     $this->registry = $registry;
     $this->config = $registry->get('config');
     $this->session = $registry->get('session');
     unset($this->session->data['warning']);
 }
Exemplo n.º 4
0
Arquivo: Text.php Projeto: jasny/Q
 /**
  * Class constructor
  *
  * @param string $file
  */
 public function __construct($file)
 {
     if (is_resource($file)) {
         $this->stream = $file;
     } else {
         $this->file = $file;
     }
     parent::__construct();
 }
Exemplo n.º 5
0
	public function __construct($line)
	{
		$matches = array();

		parent::__construct($line);

		if (! $this->extra_data)
		{
			return;
		}

		# Regular Expression Map:
		#  '(31564).(general).(critical): (.*)'
		#  '(live).(31564).(general).(critical): (.*)'
		#  '(live).(r26781.)(31564).(general).(critical): (.*)'
		#  '(live).(r26781.)(19426).(general).(error)( (req:19426:211)): (.*)'
		if (preg_match('!^([a-z-]+\.)?(r\d+\.)?(\d+)\.([a-z_]+)\.([a-z]+)( +\(req:\d+:\d+.*?\))?: *(.*)!i', $this->extra_data, $matches))
		{
			$this->extra_data = null;

			if (strlen($matches[1]))
			{
				$this->ruby_configuration = substr($matches[1], 0, -1);
			}
			if (strlen($matches[2]))
			{
				$this->ruby_revision = substr($matches[2], 1, -1);
			}
			$this->ruby_pid = $matches[3];
			$this->ruby_component = $matches[4];
			$this->ruby_error_level = $matches[5];
			if (strlen($matches[6]))
			{
				$this->ruby_request_identifier = trim($matches[6]);
			}
			$this->ruby_error_message = $matches[7];

			switch ($this->ruby_error_level)
			{
				case 'critical':
				case 'error':
				case 'warning':
				case 'info':
				case 'debug':
				case 'trace':
				case 'spam':
					$this->error_level = $this->ruby_error_level;
					break;
			}
		}
	}
 function __construct($args = NULL)
 {
     parent::__construct($args);
     if (@file_exists($this->getLogPath())) {
         $this->open();
     } else {
         $this->open("OVERRIDE");
         $this->writeToLog("Symphony Log", true);
         $this->writeToLog("Opened: " . date("d.m.Y G:i:s"), true);
         $this->writeToLog("Build: " . $args["symphony"]["build"], true);
         $this->writeToLog("--------------------------------------------", true);
         $this->writeToLog("Environment Variables", true);
         $this->writeToLog("--------------------------------------------", true);
         $constants = @get_defined_constants(true);
         if (!empty($constants) && is_array($constants)) {
             foreach ($constants["user"] as $key => $val) {
                 $this->writeToLog(General::padString($key, 30) . ": \t {$val}", true);
             }
         }
         $this->writeToLog("--------------------------------------------", true);
     }
 }
Exemplo n.º 7
0
 function __construct()
 {
     parent::__construct();
 }
 public function __construct($logDirectory)
 {
     parent::__construct(self::$CONSTfileName, $logDirectory);
 }
Exemplo n.º 9
0
Arquivo: DB.php Projeto: jasny/Q
 /**
  * Class constructor
  *
  * @param DB_Table|string $table   DB_Table or table name (string)
  * @param array           $fields  Mapping of keys to field names
  */
 public function __construct($table, $fields)
 {
     $this->table = $table;
     $this->fields = $fields;
     parent::__construct();
 }
Exemplo n.º 10
0
	public function __construct($line)
	{
		$matches = array();

		parent::__construct($line);

		if (! $this->extra_data)
		{
			return;
		}

		# Regular Expression Map:
		#  '((live)) (/prefs.php) ((User Notice)) (.*)'
		#  '(()) (/prefs.php) ((Warning)) (.*)'
		if (preg_match('!^\(([a-z]*)\) (\S+) +\((\w+ ?\w+)\) +(.*)!i', $this->extra_data, $matches))
		{
			$this->extra_data = null;

			if (strlen($matches[1]))
			{
				$this->php_configuration = $matches[1];
			}
			$this->php_script_name = $matches[2];
			$this->php_error_level = $matches[3];
			$this->php_error_message = $matches[4];

			switch ($this->php_error_level)
			{
				case 'Error':
				case 'User Error':
					$this->error_level = 'error';
					break;
				case 'Notice':
				case 'User Notice':
					$this->error_level = 'info';
					break;
				case 'Warning':
				case 'User Warning':
					$this->error_level = 'warning';
					break;
				case 'PHP Strict':
					$this->error_level = 'spam';
					break;
			}
		}
		
		# Regular Expression Map:
		# '(/cache/templates/forums/forumviewthread.parsed.php):(117) (.*)'
		if (preg_match('!^([^:]+):(\d+) +(.*)!', $this->php_error_message, $matches))
		{
			$this->php_script_path = $matches[1];
			$this->php_script_lineno = $matches[2];
			$this->php_error_message = $matches[3];
		}
		
		# Regular Expression Map:
		# '([3296920/)(75.157.111.45]) (.*)'
		# '([anon/)(202.175.26.145]) (.*)'
		if (preg_match('!^(\[[ano0-9-]+/)([0-9.]+\]) +(.*)!', $this->php_error_message, $matches))
		{
			$this->client_uid = $matches[1];
			$this->client_ip = $matches[2];
			$this->php_error_message = $matches[3];
		}
	}
Exemplo n.º 11
0
 public function __construct()
 {
     gen_time('class/DB');
     $this->makeConnection();
     parent::__construct();
 }
Exemplo n.º 12
0
 public function __construct($program_name = null, $host = null, $port = null)
 {
     parent::__construct();
     if (is_null($program_name)) {
         $program_name = LOG_SYSLOG_PROGRAM;
     }
     if (is_null($host)) {
         $host = LOG_SYSLOG_HOST;
     }
     if (is_null($port)) {
         $port = LOG_SYSLOG_PORT;
     }
     $this->SetProgramName($program_name);
     $this->SetHost($host);
     $this->SetPort($port);
 }
Exemplo n.º 13
0
Arquivo: Mail.php Projeto: jasny/Q
 /**
  * Class constructor
  *
  * @param string $to  E-mail recipient
  */
 public function __construct($props = array())
 {
     if (isset($props[0])) {
         $props['to'] = $props[0];
     }
     unset($props[0]);
     parent::__construct($props);
     if (empty($this->headers['From'])) {
         $this->headers['From'] = ini_get('sendmail_from');
     }
     if (empty($this->headers['From'])) {
         $this->headers['From'] = 'system@' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : php_uname('n'));
     }
 }