Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Git Hooks for Fun and Profit
Sep 25, 2013 @ 17:45:21

If you're a git user (you do use git, right?), there's a powerful feature that can help perform some automatic actions in your repositories - git hooks. In this new post to the SitePoint PHP blog, Timothy Boronczyk introduces you to them and how to set them up.

When certain commands are run, Git searches the .git/hooks directory for suitable hook scripts which are then executed if found. You’ll find a small set of example scripts there (you can activate them by renaming them to remove the .sample prefix and setting their executable bit), and a complete list of hooks can be found in the githooks(5) man page. This article suggests a handful of hooks which can streamline development and help improve your efficiency.

He gives four different examples of checks based on the state of the commit (like pre-commit or post-commit):

  • Lint Checks
  • Spell-Check Commit Messages
  • Checking Standards
  • Automatically Run Composer

Each comes with the example code needed to implement them and some description about what they're doing.

tagged: git hooks introduction example lint spelling standards composer

Link: http://www.sitepoint.com/git-hooks-fun-profit

Iwan Luijks' Blog:
Using Enchant with PHP on Windows - Part 1
Oct 14, 2010 @ 16:08:06

Iwan Luijks has written up the first part in a series looking at using the Enchant extension - an interface to other third-party spell-checking APIs.

PHP 5.3 introduced us to some new bundled extensions, including Enchant. The Enchant extension is a binding for the Enchant library. Note: Before PHP 5.3, Enchant was available as optional extension through PECL. This article however only covers the setup and usage of the bundled extension in PHP 5.3 This short tutorial gives an introduction to setting up and using this new extension for your PHP projects.

He talks a bit about what Enchant is and what it allows you to do (including releasing you from the language-specific dependencies of Aspell). Instructions on installing and using the extension are also included as well as a sample code snippet showing its use (checking a string against installed dictionaries). Since the dictionary installation isn't exactly intuitive, he gives an overview of where to grab them and how to set them up for your installation.

tagged: windows tutorial enchant spellcheck spelling api

Link:

Pierre's Blog:
Enchant, spelling for everyone
Mar 22, 2006 @ 13:08:35

Pierre posts today about a spelling library that's moving up through the ranks because of its ease of use - Enchant.

The Enchant library is to the spelling libraries what MDB2 is to the databases, a nice and working abstraction layer. it is developed by Dom Lachowicz from Abisource.com . It provides a simple and powerfull API to work with many spelling tools.

These tools include Aspell/Pspell, MySpell/Hunspell, Hspell, and AppleSpell. Enchant is looking to replace each of these layered under a nice, clean abstraction layer.

Pierre also notes an update he's made to the PHP binder:

The PHP binder is already more than one year old and is trying to make its place in the php world. I just released a maintaince release (1.0.1), it adds a function to get a list of available dictionaries (enchant_broker_list_dicts).

tagged: spelling everyone abstraction layer aspell myspell hspell applespell spelling everyone abstraction layer aspell myspell hspell applespell

Link:

Pierre's Blog:
Enchant, spelling for everyone
Mar 22, 2006 @ 13:08:35

Pierre posts today about a spelling library that's moving up through the ranks because of its ease of use - Enchant.

The Enchant library is to the spelling libraries what MDB2 is to the databases, a nice and working abstraction layer. it is developed by Dom Lachowicz from Abisource.com . It provides a simple and powerfull API to work with many spelling tools.

These tools include Aspell/Pspell, MySpell/Hunspell, Hspell, and AppleSpell. Enchant is looking to replace each of these layered under a nice, clean abstraction layer.

Pierre also notes an update he's made to the PHP binder:

The PHP binder is already more than one year old and is trying to make its place in the php world. I just released a maintaince release (1.0.1), it adds a function to get a list of available dictionaries (enchant_broker_list_dicts).

tagged: spelling everyone abstraction layer aspell myspell hspell applespell spelling everyone abstraction layer aspell myspell hspell applespell

Link:


Trending Topics: