Jump to content

bl00dshooter

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bl00dshooter's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The whole point of this was that this hook file function should be used over the core function, if it exists. Well, that was the better idea I could come up with. Do you have a better suggestion of structuration of a hook system, that I can implement?
  2. Hello folks, So, I have decided to start a small CMS, for learning purposes. It's going pretty smooth, but I decided to implement a hook system, so you can extend the CMS without touching the core files. I have the following idea: To create a hook, a person creates a php file in the hooks folder, and simply redeclare every method of my classes he/she wants. Example: I have a class called Users that has a method called showUser, like the following: class Users { function showUser($id) { echo "Welcome ". $id; } } then, in the hooks folder, a file called Users_leavePlease.php: function showUser($id) { echo "Please leave " . $id; } The problem is...php won't allow it. It gives me the function redeclare error if I include the php file. Any ideas how can I make this work? thanks, bl00dshooter.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.