PHP Classes

Simply, Help!

Recommend this page to a friend!

      PHP WSDL Generator  >  All threads  >  Simply, Help!  >  (Un) Subscribe thread alerts  
Subject:Simply, Help!
Summary:PHP beginner, having problems referencing classes
Messages:3
Author:Jerry Altman
Date:2015-04-16 20:31:27
 

  1. Simply, Help!   Reply   Report abuse  
Picture of Jerry Altman Jerry Altman - 2015-04-16 20:31:27
Hi! Sorry to bug you. I downloaded the package, went through a few rounds before I figured out what needed to be done, celebrated a bit when it appeared the install went as it should.

Now I'm running into problems referencing the appropriate pages/classes to do the WSDL creation from my service class. I'm trying to avoid having to reference the entire path to all the required classes, want to just use the namespace and class using either the "use" or "require/-_once" statement. When I debug, I get an error message that indicates the classes can't be found.

All the files are under "vendor/(php2wsdl|wingu)..." after using composer to install them, and I do have references to them under the "references" item under the project.

Quick note: I'm using Visual Studio with a PHP extension as an editor.

Can you show me if I should need to be using "require" or "use" in the first place, and if so, how I should be able to use them? If it's similar to what I've been doing already, I'll just know it's a problem with the installation or the way the editor is handling things. Or something else I'll have to figure out.

Any help is greatly appreciated.

Thank you!

  2. Re: Simply, Help!   Reply   Report abuse  
Picture of Protung Dragos Protung Dragos - 2015-04-16 23:49:32 - In reply to message 1 from Jerry Altman
Hi,

It's a bit hard to understand what your problem is, but what i think you mean is that you can not autoload the package.
You said you managed to install it using composer. Now in you code you need to load the composer autoloader and it will do the rest. Read here for more info
getcomposer.org/doc/00-intro.md#aut ...

Good luck

  3. Re: Simply, Help!   Reply   Report abuse  
Picture of Jerry Altman Jerry Altman - 2015-04-17 02:00:54 - In reply to message 2 from Protung Dragos
Thank you so much for your reply and guidance! I'll give it a shot, hopefully will be able to get everything working. Have a great one!