Tag Archives: methods

Get only declared methods of a class in PHP

Questions: Hello I need to get only the methods declared in a class, and not the inherited methods. I need this for cakePHP. I am getting all the controllers, loading them and retrieving the methods from those controllers. But not only are the declared methods coming, but also the inherited ones. Is there any method… Read More »

print_r to get object methods in PHP?

Questions: I’m working with Views 2 in Drupal 6, and I am having difficulty finding documentation on the methods of the View object. Is there any PHP function like print_r that outputs methods as well as fields? Answers:

Want to use both GET and POST methods

Questions: I know result page that uses GET method can be bookmarked while the one using POST cannot be. I also know about the restrictions of the GET methods. Now suppose I want to build a search engine which by default uses GET allowing users to bookmark but when the length of the search phrase… Read More »

Laravel Form methods VS traditional coding

Questions: I am currently learning Laravel and finding it really useful and interesting. At the moment I am making a simple online application form. What are the biggest advantages to doing things using the Laravel syntax like: {{ Form::open(array(‘url’ => ‘foo/bar’)) }} As opposed to simply: <form action=”foo/bar”> Or: echo Form::text(‘username’); Instead of: <input type=”text”… Read More »

Unity 3D Puts/Deletes http methods

Questions: I’m thinking of porting a JavaScript web app to C# Unity3D (Free / Personal Version) for an RPG I’m developing. I have an extensible, separate API built in PHP Laravel 5.1, which my game interacts with through jQuery http calls. I need to continue making standard restful calls, get, post, put, delete, etc within… Read More »

Default visibility of class methods in PHP

Questions: I looked at the manual, but I can’t seem to find the answer. What is the default visibility in PHP for methods without a visibility declaration? Does PHP have a package visibility like in Java? For example, in the following code, is go() public or private? class test { function go() { } }… Read More »

Programmatically retrieve list of all shipping methods

Questions: I’m writing a quick-and-dirty module to restrict shipping methods based on products in the cart. For example, if the customer adds food, I only want overnight shipping methods to be selected. Some of the commercial extensions are just overkill and have way more functionality that I need. Each product will have a dropdown attribute… Read More »