I have been working on a library which contains a large set of functions. For the sake of simplicity, I am going to use just one set as an example.
I am not sure which is the better way, in terms of ease of use and performance, whether I should put those methods provided as individual methods, prepended with the function category, or whether it is better to create a Class containing all the method as static methods.
For Example:
Individual methods: (p.s. this could also be writen without request_
in the function name and using Namespaces instead)
function request_method() { ... }
function request_url() { ... }
function request_useragent() { ... }
....
Classed method:
class Request {
public static function method() { ... }
public static function url() { ... }
public static function useragent() { ... }
...
}
request_url()
, orRequest::url()