netsensia / companies-house
Wrapper classes for Companies House Gateway
Installs: 1 334
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- zendframework/zendframework: >=2.2.0rc3
README
This package is no longer maintained.
It has been superceded by https://packagist.org/packages/netsensia/companieshouse-api-php-client which wraps the new gov.uk companies house Rest API rather than the XML gateway.
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);
$companyModel->loadCompanyDetails($companyNumber);
Then:
$companyName = $companyModel->getCompanyName();
Other model examples (follow chosen pattern above to instantiate the request object in each case)
$companyAppointmentsModel = $request->loadCompanyAppointments(
$companyNumber,
$companyModel->getCompanyName(),
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 */
);