PHP

Getters and Setters are better than public properties

Posted on

I ran into something that bit me in the butt the other day and I have been meaning to talk about it. Getters and Setters are better than public properties! In theory, it seems like a property of a class that should be freely written and mostly read from should be a public property. It […]

PHP

Serving Multiple File Types with AWS through SlimPHP

Posted on

Ok, I recently ran into something where I wanted to implement API downloads using SlimPHP with a direct link (or id). The files are actually served through Amazon S3. Now, the good thing is that if you are using SlimPHP version 3, it takes the Guzzle interface for the response which you can easily drop […]

PHP

Sunshine PHP 2017

Posted on

I had a fantastic time as I always do at Sunshine PHP 2017 down in Miami this year. I chose this conference because there were several speakers that I had heard about that I wanted to hear and they did not disappoint. And let’s be honest, the other big reason is to get down to […]

PHP

PHP Multiple Signatures in Class Constructors

Posted on

Ok, I wanted to share what I have been working on as usual and two different ways I have come across kind of implementing multiple constructor methods within one class. One way is to take the data coming into the constructor and delegating to private methods for initialization based on the type that comes in. […]

PHP

PHP Generators

Posted on

Ok, I have been reading Modern PHP by Josh Lockhart and I came across something that I never even knew that I could use to immediately update my code and that is generators. If you don’t know what they are, they are basically one way iterators without all the fancy stuff. But the greatest use […]

PHP

PHP and multiple header locations

Posted on

Ok, this is going to be a short post since I am in the middle of a rollout. But I am transferring some pages over and I want to make sure customers don’t lose bookmarks that they have, so I redirect with PHP header tags. Well, you ever thought what would happen if you have […]

PHP

PHP Encryption and Remember Me

Posted on

Programmers, or at least those serious about security and encryption, will tell you that the only way to be secure is not have a remember me function anyways. In addition to that, you would also not have a reset password functionality either. But we all know in today’s world, you almost have to have it […]

Javascript

CORS Slim PHP Setup

Posted on

Ok, another PHP post but this time it’s about setting up some middleware for a slim PHP application. Let me set this up. We are building a simple REST API for use with a basic phone native app (both Android and iOS). Me being new to this, I wasn’t sure if the native app domain […]

CLI

PHP CLI and Local Setup Headaches

Posted on

Ok, I had some trouble running across some Linux setup stuff when it comes to running cron jobs for PHP scripts that I wanted to pass along in a helpful post. We had some cron jobs that were running weekly and monthly for a long time in the old CGI environment. They were working just […]