pear

pear

Using Different Loggers In Phing

Tuesday, November 17, 2009 - 21:26

When you run a phing script it will print things out to the console. These messages are either system messages (eg. BUILD STARTED) or echo messages that you have put into your build.xml file. All of this output is controlled and created by a logger file. The default logger is called (unsuprsingly) DefaultLogger and will be used as a default. There are a few different types of logger available, all of which can be found in the listener folder in your PEAR\phing directory.

Category: 

Ping A Website Using PEAR's Net_Ping

Wednesday, April 22, 2009 - 19:59

Net_Ping is a PHP wrapper for the ping program and provides a neat way pinging a host or checking if a site is up and running. To install it you just need to have pear installed. Once that is done you can do a search for PEAR Net_Ping by opening a terminal and typing:

> ping search ping

This will return the following:

Category: 

Install PHPDocumentor

Wednesday, January 21, 2009 - 11:12

PHPDocumentor is a fast and convent way of creating API documentation for your PHP programs and classes. If you are familiar with the world of Java, it works in much the same way as the JavaDoc program, indeed, it is based on this program.

PHPDocumentor can be run in a number of different ways, but I have found that the easiest way is to, again, use PEAR to install everything you need. To install PHPDocumentor using PEAR use the following command.

Category: 

Installing PHPUnit

Monday, January 19, 2009 - 17:57

PHPUnit is a powerful unit testing framework written in and for PHP. Rather than testing everything as a whole the idea behind PHPUnit is to test that everything works as it is expected to work before it is integrated into the rest of the program. In this way problems are found earlier rather than later and this makes fixing them a lot easier. With tests written for every small component of the program it is then possible to test the whole thing by running all of the tests at once. It is also possible to automate PHPUnit so that everything about a program is tested before it is built.

Category: 

Getting And Installing Phing

Friday, January 2, 2009 - 10:28

To get Phing you will need to have PEAR installed along with PHP. On a Windows system you can install PEAR by running the go-pear.bat file and running through the prompts there.

To get Phing just run the following commands.

Category: 

Automated Build With Phing

Friday, January 2, 2009 - 09:47

Phing is a PHP tool that allows you to build projects. Phing stands for PHing Is Not Gnu make, which is kind of a common coder's joke. It is basically a tool that will take a set of files in multiple directories and create either a zip file or a numerous other things that you might want to do with a project.

Phing itself is a PHP program, so all that is needed to run it is a working copy of PHP. Also, because Phing is part of PEAR it is easy to install, and you don't need to install Apache to run it.

Category: