All is math.


Entries tagged with 'object oriented'

  • PHP PayPal Class

    Hot on the heels of writing a database class with a bunch of functions, I’ve converted my previous PayPal functions file to be a class file. The main repeating variables like the target window and PayPal account can be called at the time of instantiating the class object and then each of the functions uses these object variables avoiding repetition. I’m really pleased with the base progress being made on this project, after years of pulling everything together on a needs basis I will be starting each new project from now on with a solid groundwork of files that I can pick and choose from and amend to suit needs.

    Categories:Web Design|PHP\MySQL

    Tags: | | | |

  • mysqlDatabase Class

    My first class file is in the pipeline, though I think I might have picked a bit of a tricky class to start with. Troubleshooting the new (to me) class syntax and the MySQL connection proved tricky but I got there in the end. My main stumbing blocks were the placing of $s in the code for calling object variables, either too many or too few till I got the hang of it. Whilst this class will form the basis of the gallery backend for Panoramic Edinburgh, I am maintaining a more non-specific version for future projects. First the object variables are declared: var $host; var $user; var $pass; var $database; Next comes the constructor function. I give the constructor function the $host, $user, $password, $database variables and assign them to the newly created object. If these variable are not [...]

    Categories:Web Design|PHP\MySQL

    Tags: |