File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
CodeIgniter/Framework/core Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,33 @@ function calendar($config = [])
295295
296296// ------------------------------------------------------------------------
297297
298+ if ( ! function_exists ('hooks ' ))
299+ {
300+ /**
301+ * Helper function to load and return an instance of the Hooks class.
302+ *
303+ * This function loads and returns an instance of the Hooks class,
304+ * which is responsible for handling hooks in the application.
305+ *
306+ * @return Hooks An instance of the Hooks class.
307+ *
308+ */
309+ function hooks ()
310+ {
311+ /**
312+ * Instance of the Hooks class.
313+ *
314+ * @var Hooks
315+ */
316+ $ hooks =& load_class ('Hooks ' , 'core ' );
317+
318+ // Return the instance of the Hooks class.
319+ return $ hooks ;
320+ }
321+ }
322+
323+ // ------------------------------------------------------------------------
324+
298325if ( ! function_exists ('load_class ' ))
299326{
300327 /**
You can’t perform that action at this time.
0 commit comments