Beispiel #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();
 }
 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']);
 }
Beispiel #4
0
Datei: Text.php Projekt: jasny/Q
 /**
  * Class constructor
  *
  * @param string $file
  */
 public function __construct($file)
 {
     if (is_resource($file)) {
         $this->stream = $file;
     } else {
         $this->file = $file;
     }
     parent::__construct();
 }
	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);
     }
 }
Beispiel #7
0
 function __construct()
 {
     parent::__construct();
 }
 public function __construct($logDirectory)
 {
     parent::__construct(self::$CONSTfileName, $logDirectory);
 }
Beispiel #9
0
Datei: DB.php Projekt: 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();
 }
Beispiel #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];
		}
	}
 public function __construct()
 {
     gen_time('class/DB');
     $this->makeConnection();
     parent::__construct();
 }
Beispiel #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);
 }
Beispiel #13
0
Datei: Mail.php Projekt: 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'));
     }
 }