Packagist Latest Releases for 09.17.2014
September 17, 2014 @ 08:08:23
Recent releases from the Packagist:0 comments voice your opinion now!
Recent posts from PHP Quickfix
September 17, 2014 @ 07:04:00
Recent posts from the PHP Quickfix site:0 comments voice your opinion now!
Accessing protected properties from objects that share the same ancestry.
September 16, 2014 @ 11:19:23
In his latest post Evert Pot shows an interesting side effect of working with two objects from the same class: accessing protected properties from one instance to the other.
I realized something odd about accessing protected properties the other day. It's possible in PHP to access protected properties from other objects, as long as they are from the same class. [...] I always thought that protected strictly allows objects to access things from the current inheritence tree, but didn't realize that this also extends to other instances of the same object.
He includes a bit of sample code showing two object instances each being able to access the protected "val" property from the other. He also shows an example of how it works in two different objects, both that derive from a common ancestor. He shares a few other code examples showing this relationship and points out a few places where it could come in handy.
SitePoint PHP Blog:
Create a Movie Recommendation App with Prediction.io - Implementation
September 16, 2014 @ 10:54:16
The SitePoint PHP blog continues their series about creating a movie prediction engine with Prediction.io in this second part focusing on implementation. In the first part of the series they set up the server and configuration to make the jump into the code. This second part gets more into the application side and features working code linking the prediction engine with the TheMovieDB API.
He jumps right into the code, showing how to:
The recommendations are based on ratings on other movies in the database with most of that logic happening behind the scenes instead of in the PHP script. The results are then output to the page along with the other movie data.
Sending attachments in multipart emails with ZendMail
September 16, 2014 @ 09:18:09
Rob Allen has a new post today showing you how to use the ZendMail component of the Zend Framework 2 to send attachments with multipart emails. A multipart email allows you to combine both the HTML and plain text versions of the content into a single email.
I've written before about how to send an HTML email with a text alternative in ZendMail, but recently needed to send an attachment with my multipart email. With help from various sources on the Internet, this is how to do it.
He includes the full code for the example first: a "sendEmail" function that sets up the MIME and plain-text parts and uses the "MimeMessage" and "MimePart" objects to attach the file. He goes through each of the parts of the script and describes what's happening and how that changes the content of the email. You can find out more about the ZendMail component in this section on the Zend Framework manual.
Packagist Latest Releases for 09.16.2014
September 16, 2014 @ 08:08:02
Recent releases from the Packagist:
Latest PECL Releases for 09.16.2014
September 16, 2014 @ 07:03:14
Latest PECL Releases:0 comments voice your opinion now!
phpmetrics of popular php projects
September 15, 2014 @ 10:11:01
Peter Aba has put together a a set of visualizations around the popularity of various PHP projects using the phpmetrics tool. He decided to run it against several projects he knows of and share the results.
I came across a new tool called phpmetrics. It can be used for, what a surprise, calculating and displaying metrics for php. I fell in love with this cute little tool in an instance and decided to run it on some php projects that I consider important. I'm aware of the fact that the list is currently far from complete, but it's probably still worth a look. I especially love the "maintenability" (sic!) reports, I find those big red spots just as disgusting as I find ugly code the same.
He's broken it up into a few different sections with lots of different projects under each:
There's also an "Other" (and "Backfire") category that contains the results for the results of phpmetrics itself. He also includes a few issues he ran across during the processing of the metrics, some with the phpmetrics tool itself and some with the libraries themselves.
SitePoint PHP Blog:
Create a Movie Recommendation App with Prediction.io - Setup
September 15, 2014 @ 09:47:24
In this tutorial, I'm going to walk you through Prediction IO, an open-source machine learning server. It allows you to create applications that could do the following: recommend items (e.g. movies, products, food), predict user behavior, identify item similarity and rank items. You can pretty much build any machine learning application with ease using Prediction IO. You don't have to deal with numbers and algorithms and you can just concentrate on building the app itself.
He walks you through the download and install of the Prediction IO software, how to start up the server and how to access its web interface. He shows you how to create an "engine" that will be used to make the recommendations and some of the settings allowing you to tailor it to your needs. The script will hook into The Movie DB API for content. He starts in on the PHP packages that will be needed to make the API connection and recommendations, but the actual code will come in a later article.
Packagist Latest Releases for 09.15.2014
September 15, 2014 @ 08:06:48
Recent releases from the Packagist:
Don't see your event here?
Let us know!
development application introduction series zendserver podcast threedevsandamaybe community language laravel interview deployment tips developer release list code conference framework api
|All content copyright, 2014 PHPDeveloper.org :: firstname.lastname@example.org - Powered by the Solar PHP Framework|