Closed dimitriBouteille closed 5 months ago
Is it possible to add dynamic properties support for the \wpdb class?
\wpdb
This class contain magic method __get :
__get
/** * Makes private properties readable for backward compatibility. * * @since 3.5.0 * * @param string $name The private member to get, and optionally process. * @return mixed The private member. */ public function __get( $name ) { if ( 'col_info' === $name ) { $this->load_col_info(); } return $this->$name; }
Hello Dimitri 👋🏻
You can add it in a stubs file. Just copy it from WP core stubs.
But be aware!!
for backward compatibility
Is it possible to add dynamic properties support for the
\wpdb
class?This class contain magic method
__get
: