OOP: Instantiate plugin, passing parameters and accessing super class properties from sub class object

I would like to know the "best" – OOP-way – and WP-compatible – format for instantiating an object, while passing arguments ( which are defined as properties in the parent class ) – which are then cleanly and correctly available to all sub classes, which extend the parent.

I would like to know how to make $ this->slug ( the parent prop ) available cleanly within the sub class, without having to pass the arguments to this class constructor.

The example code concept below works, but something smells wrong:

<?php  // plugin.php  namespace Q\Plugin;  // If this file is called directly, Bulk! if ( ! defined( 'ABSPATH' ) ) {     return; }  // autoloader ## require_once __DIR__ . '/autoload.php';  // Define Class ## class Plugin {      // class properties ##     protected $  slug     = false;      // construct ##     public function __construct( Array $  args = [] ) {          // set class props, if defined - check using null coalescing operator ##         $  this->slug     = $  args['slug'] ?? false ;      }      // public init callback ##     public function init() {          // setup CPT ##         $  cpt = new \Q\Plugin\CPT([             'slug'      => $  this->slug,         ]);         $  cpt->init();      }  }  // instantiate the plugin class and make the returned object available as a (optional) global variable  ## global $  q_plugin; $  q_plugin = new Plugin([     'slug'      => 'q_cpt', // cpt slug -- singular ## ]); $  q_plugin->init();  // NAMESPACE/cpt.php  namespace Q\Plugin\CPT;  class CPT extends \Q\Plugin {      // construct ##     public function __construct( Array $  args = [] ) {          // store passed args ##         $  this->args = $  args;      }      // public init callback ##     public function init() {          // sanity ##         if(              ! isset( $  this->args['slug'] )          ){              error_log( 'Error in params passed to '.__CLASS__ );              return false;          }          // $  this->args['slug'] is now available to use in register_post_type function         // BUT, I would like to know how to make $  this->slug ( the parent prop ) available cleanly, without having to pass the arguments to this class constructor      }  } 


PCI Compliance for developers accessing a production database for support

As a developer, when an Incident comes in and reaches Tier 3 support (The development team), how can the developers get access to query the Production Database, while remaining PCI Compliant? I’m admittedly a newbie when it comes to PCI Compliance. Is this just a case of Read-Only accounts? Is this a case of data masking? Is this a case of having a Production copy within Production so devs can’t hit a "Live" db? What’s the easiest, and compliant way for developers to be able to perform application incident support in production?

Trigger function accessing newly updated data from another table

I have two tables A and B. In one transaction I update both tables. In the trigger function after update I want to select data from both tables, but the result is the old data. The trigger is on table A, but they both are being updated in the same transaction. Is this possible to achieve or I have to think for another approach?

Unrelated applications like games accessing ‘webcache’ related files

As title suggests im wondering if a game ,for example, has any business accessing ‘webcache_counters’.

After attempting to clean my webcachev01 file due to its oddly large filesize given the fact i dont use IE or Microsoft Edge at all, I noticed in processexplorer that alot of my random applications were accessing a file with the suffix ‘webcache_counters’ followed by a string of numbers I’d imagine to be a registry key.

Strange thing about this handle is that i cant view its properties nor close the handle. With the first saying that it is ‘Unable to query’ and the latter saying i lack administrative rights. To clarify I am the sole user and administrator on this machine.

All this is having me increasingly worried, ive been having recent fears of malware on my PC and this has appeared in my rigourous inquiry of my files and processes. How can an innocuous sounding file/handle bar me from even closing it in process explorer?

Tunnel Connection Failed error when accessing WP site from external network

I have a LAMP server setup at home with wordpress. Static IP on the server and port 80 forwarded on the router to that server. Apache listening on port 80 and virtual host configured accordingly.

It was working fine but now when I browse to my domain gws.voyez.ca (that points to my public IP) browser just shows “Tunnel Connection Failed”. Oddly enough, I can still access pages in that folder (eg. gws.voyez.ca/test.html or gws.voyez.ca/phpinfo.php serve fine). This only happens externally; on internal LAN no issues. Have tried from multiple devices and different browsers.

It was working fine for a few weeks and just seems to have broken (no changes that I can think of).

Potentially ISP blocking something?

Thanks for reading.


Prospective employer accessing fbevents.js on my personal PC [closed]

I applied for a telecommuting job. The prospective employer said they needed to see if my personal PC was sufficient (RAM, available space, etc.). In order for them to do this, I had to copy an address into a pop-up window and select start. This process left a folder on my desktop and I saw one of the files was fbevents.js.

  1. Did they need this file to access my files
  2. Did they access this file from my PC and if so what might the purpose be?

Is accessing /proc/ inside docker container a security breach?

In a docker container I am reading the files /proc/stat and /proc/meminfo. As I understand they are the ones of the host. (Not local to the docker container) In a meeting, a co-worker said that this is a security breach and must be vetted by internal security consultants. The container does neither run privileged, nor as root. My program inside the container does neither.

Question 1: is he right in saying, that this is a security breach? Question 2: What if I bind-mounted the host’s /proc directory to some folder of the container. Would that then be a security breach?