PHPackages                             sclinternet/scl-contact - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sclinternet/scl-contact

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sclinternet/scl-contact
=======================

A useful set of classes and interfaces for storing contact information

61.5k2PHP

Since Jan 13Pushed 12y ago1 watchersCompare

[ Source](https://github.com/SCLInternet/SclContact)[ Packagist](https://packagist.org/packages/sclinternet/scl-contact)[ RSS](/packages/sclinternet-scl-contact/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SclContact
==========

[](#sclcontact)

[![Build Status](https://camo.githubusercontent.com/c47db4b5bc8a2226c66c454a3378d6a2e42f92e3adb7d5d0513e4d40336e992d/68747470733a2f2f7472617669732d63692e6f72672f53434c496e7465726e65742f53636c436f6e746163742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/SCLInternet/SclZfContact)[![Coverage Status](https://camo.githubusercontent.com/ff499be1a8a2bc8a02e7630136bee3515aed06cce936581a41fcf95f5df5b53a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f53434c496e7465726e65742f53636c436f6e746163742f62616467652e706e67)](https://coveralls.io/r/SCLInternet/SclContact)

This module's main purpose is to provide a set of common interfaces for a persons contact details. It includes interfaces for

- Contact Objects : `SclContact\ContactInterface` (aggregates all other interfaces)
- A persons name : `SclContact\PersonNameInterface`
- Phone numbers : `SclContact\PhoneNumberInterface`
- Email address : `SclContact\EmailInterface`
- Postal address : `SclContact\AddressInterface`
- Postcode : `SclContact\PostcodeInterface`
- Country : `SclContact\CountryInterface`

This module also contains a basic implementation of each interface which can be used or extend.

Limitations
-----------

[](#limitations)

The names of the address properties are based on addresses in the United Kingdom. It will work fine for other countries but it has methods like `getCounty()`where people from the USA might expect `getState()`.

The contact interface provides for 1 phone number and 1 fax number. A more flexible approach might be to have a flexible number of phone numbers with a type (mobile, fax, home, work, etc).

There are no social network fields, it might make sense to add these in the no so distant future.

Installation
============

[](#installation)

Installation is easy via composer, simple run:

`php composer.phar require sclinternet/scl-contact:dev-master`

Then add `SclContact` to your ZF2 application's modules config.

Fieldsets
=========

[](#fieldsets)

2 fieldsets are provided, these are:

- `SclContact\Form\Fieldset\Contact`
- `SclContact\Form\Fieldset\Address`

To use these it is recommended that you use Zend Framework 2.2's `FormElementManager` to build your forms.

Hydrators
=========

[](#hydrators)

There are also 2 Hydrators

- `SclContact\Hydrator\ContactHydrator`
- `SclContact\Hydrator\AddressHydrator`

Again to use these it is recommended that you used Zend Framework 2.2's `HydratorManager`.

InputFilters
============

[](#inputfilters)

Not yet implementated. Will be done by 0.1 release.

CountryManager
==============

[](#countrymanager)

Country objects are assigned to Address objects via a CountryMananger. There is a default `SclContact\Country\CountryManager` provided which simply returns country objects with with the provided 2 digit country code. However you can implement your own country manager froom `SclContact\Country\CountryManagerInterface`if you wish to do things like connect up address records with a country table in your database.

Once you have created your own implementation of `SclContact\Country\CountryManagerInterface` simply specify it in your config like so to use it:

```
return array(
    'scl_contact' => array(
        'country_manager' => 'MyApplication\MyCountryManager',
    ),
);
```

Contributing &amp; Using
========================

[](#contributing--using)

Feel free to fork or make feature requests.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1959183?v=4)[Tom Oram](/maintainers/tomphp)[@tomphp](https://github.com/tomphp)

---

Top Contributors

[![tomphp](https://avatars.githubusercontent.com/u/1959183?v=4)](https://github.com/tomphp "tomphp (6 commits)")

### Embed Badge

![Health badge](/badges/sclinternet-scl-contact/health.svg)

```
[![Health](https://phpackages.com/badges/sclinternet-scl-contact/health.svg)](https://phpackages.com/packages/sclinternet-scl-contact)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
