PHP traits provide a convenient means of sharing methods between classes. There are times though that we may need to override or extend a method defined in a trait attached to a class. Let’s take a look at how we can achieve this.
This is the website of Andy Carter a PHP and jQuery web developer in the Steel City. Working with CakePHP (and a bit of Textpattern and Drupal too).
Using CDNs is great for improving site performance and lowering bandwidth usage on your server. However, they can also open up a security hole in your site. Troy Hunt has written a great piece about how you can protect your embedded content with subresource integrity.
The SRI Hash Generator website is a great resource for getting started with using subresource integrity (SRI).
I’ve written a piece on my Test Payment Cards cheat sheet for Smashing Magazine explaining the motivations behind it. You can read Testing Credit-Card Numbers In E-Commerce Checkouts over on the Smashing Magazine website now.
I’ve just released a new beta version of arc_meta for Textpattern 4.6.
As with the previous beta release, this one has a minimum requirement of Textpattern 4.6 which is also still in beta release; so neither of them are recommended for use on a live production site. However, if you use arc_meta and are testing the new version of Textpattern please check out this new release.
I’m a keen advocate for following coding standards. They help maintain consistency in code, especially when developing with others, and can generally help you to write better code. I work with Sublime Text for developing in PHP and have it set up to check against whichever coding standard I am currently using as I code. For PHP development the tool to use is PHP CodeSniffer which I’ve previously written about setting up for Sublime Text 3 on this site.
Package managers like Composer for PHP and NPM for Node have become essential tools for simplifying a developer’s life. A package manager is a tool for keeping track of what you’ve installed, as well as installing and upgrading packages. They also check for dependencies and compatibility. Bower is a package manager for the web.
A beginners guide to the task runner Gulp. Taking a look at why you should use it and why it is possibly better than Grunt.
- RT @stevefaulkner: Proposal: devs SHOULD NOT use content="user-scalable=no | maximum-scale=1.0 " on meta github.com/w3c/html/issue… #HTML5 @W… 29 September 2016
- Just realised that @opera now comes with free VPN built in to Private Browsing. Another excellent feature from a great browser. #webbrowser 28 September 2016
- ... the original CakePHP 2 events article can be found here andy-carter.com/blog/events-in… (in English) #cakephp #php 25 September 2016
- Thanks to @danilosantosdev my CakePHP 2 events article has been translated into Portuguese: medium.com/@danilosantosd… #cakephp #php 25 September 2016