As an exercise i want to create a component for CakePHP framework.
I have been thinking about creating a URL component to deal with all the URLs stuff.
I was thinking about this methods:
getRealURL($shortedURL)getDomain($url)isSecure($url)getProtocol($url)getPort($url)getExtension($url)getShortURL($url)isYoutubeVideo($url)getParam($url, $var)getNumberOfParams($url)getParams($url, $vars)isImage($url)getURLFromText($text)eraseURlsFromText($text)shortURLsFromText($text)
What do you think about it?
Any other ideas for the component?
Do you think the last 3 ones should not be in this component?
Any other suggestions will be welcome 🙂
Thanks.
This is a wild mix of things that are already available (port, url, ssl, params, protocol,… see response/request objects) and some really non-common things that should not go into the core of the framework.
Also this should not be a component, actually none of it, but in fact behaviors and helpers.
So if you want to do it create a plugin on github and publish it there.