Wrapper classes for Companies House Gateway

v0.2.3 2014-03-18 21:19 UTC


Zend Framework 2 (optional) module to simplify access to company data via the Companies House (UK) XML Gateway.

Very early stages of development. Currently supports retrieving the following elements from the XML gateway:

  • Company details
  • Company appointments
  • Company name search

Development of the remainder should be fairly swift, but any contributions will be appreciated :)

Add the following to your composer.json:

"require" : {
    "netsensia/companies-house" : ">=0.2.0"

To integrate as a Zend Framework 2 module, copy config/netsensia-companies-house.php.dist to config/autoload/netsensia-companies-house.php and fill in the blanks. Add the module to your config/application.config.php Then, from within a controller you can use like this:

$request = $this->getServiceLocator()->get('NetsensiaCompanies\Request\CompanyDetailsRequest');
$companyModel = $loader->loadCompanyDetails($companyNumber);

Or, if not using ZF2:

$config = [
    'SenderID' => '',
    'password' => '',
    'email'    => '',

$request = new \NetsensiaCompanies\Request\CompanyDetailsRequest($config);


$companyName = $companyModel->getCompanyName();

Other model examples (follow chosen pattern above to instantiate the request object in each case)

$companyAppointmentsModel = $request->loadCompanyAppointments(
    true /* include resigned appointments */
    true /* request all continuation pages when results are paginated */

$nameSearchResults = $request->loadResults(
    $partialCompanyName, /* will return results close to this name */
    $numResults /* max 1000 */