File tree Expand file tree Collapse file tree 1 file changed +32
-5
lines changed
Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -71,14 +71,41 @@ public function getMethods()
7171 }
7272
7373 /**
74- * This is not a PSR-2 compliant method name
75- * @deprecated 2025-07-04
74+ * Magic method to handle deprecated method calls
7675 *
76+ * @param string $func The name of the method being called
77+ * @param array $args The arguments passed to the method
78+ * @return mixed
7779 */
78- public function get_flags ( $ setflags ) // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
80+ public function __call ( $ func , $ args )
7981 {
80- dbg_deprecated ('getFlags() ' );
81- return $ this ->getFlags ($ setflags );
82+ switch ($ func ) {
83+ case 'get_flags ' :
84+ dbg_deprecated ('getFlags() ' );
85+ return $ this ->getFlags ($ args [0 ]);
86+ case '_get_instructions ' :
87+ dbg_deprecated ('getInstructions() ' );
88+ return $ this ->getInstructions (
89+ $ args [0 ], // page
90+ $ args [1 ], // sect
91+ $ args [2 ], // mode
92+ $ args [3 ], // lvl
93+ $ args [4 ], // flags
94+ $ args [5 ] ?? null , // root_id
95+ $ args [6 ] ?? [] // included_pages
96+ );
97+ case '_get_included_pages ' :
98+ dbg_deprecated ('getIncludedPages() ' );
99+ return $ this ->getIncludedPages (
100+ $ args [0 ], // mode
101+ $ args [1 ], // page
102+ $ args [2 ], // sect
103+ $ args [3 ], // parent_id
104+ $ args [4 ] // flags
105+ );
106+ default :
107+ throw new \BadMethodCallException ("Method $ func does not exist in " . __CLASS__ );
108+ }
82109 }
83110
84111 /**
You can’t perform that action at this time.
0 commit comments