The simplest PHP Hook System.
This Hook System store all the hooks and there values in an array.
This Hook is the simplest Hook ever made.
Use the set()
member function to set whatever you want, Accept any type mixed
.
<?php
// Require the Hook
require 'hook.php';
// Initiate the Hook
$Hook = new Hook();
// Set value `Just For Testing` in the array key `test`
$Hook->set('test', 'Just For Testing');
?>
Use the get()
member function to get value of the provided key.
<?php
// Require the Hook
require 'hook.php';
// Initiate the Hook
$Hook = new Hook();
// Get every value from the key `test`
$Hook->get('test');
?>
Use the unset()
member function to delete the value of the provided key.
<?php
// Require the Hook
require 'hook.php';
// Initiate the Hook
$Hook = new Hook();
// Delete the value of the key `test`
$Hook->unset('test');
?>
You can make additional changes to this Hook if you like. For anything you didn't understand, Write you comments down ⬇️
Can be used as:
Core File
Index File
Output