Skip to content

Commit 3506a3c

Browse files
committed
More API standardization.
1 parent f63b5e3 commit 3506a3c

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

src/org/nameapi/client/services/ServiceFactory.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use org\nameapi\ontology\input\context\Context;
66

77
require_once('system/SystemServiceFactory.php');
8-
require_once('parser/NameParserServiceFactory.php');
8+
require_once('parser/ParserServiceFactory.php');
99
require_once('genderizer/GenderizerServiceFactory.php');
1010
require_once('matcher/MatcherServiceFactory.php');
1111
require_once('formatter/FormatterServiceFactory.php');
@@ -29,7 +29,7 @@ class ServiceFactory {
2929

3030
private $context;
3131
private $systemServiceFactory;
32-
private $nameParserServiceFactory;
32+
private $parserServiceFactory;
3333
private $genderizerServiceFactory;
3434
private $matcherServiceFactory;
3535
private $formatterServiceFactory;
@@ -54,19 +54,19 @@ public function systemServices() {
5454
}
5555

5656
/**
57-
* @return parser\NameParserServiceFactory
57+
* @return parser\ParserServiceFactory
5858
*/
59-
public function nameParserServiceFactory() {
60-
if ($this->nameParserServiceFactory==null) {
61-
$this->nameParserServiceFactory = new parser\NameParserServiceFactory($this->context);
59+
public function parserServices() {
60+
if ($this->parserServiceFactory==null) {
61+
$this->parserServiceFactory = new parser\ParserServiceFactory($this->context);
6262
}
63-
return $this->nameParserServiceFactory;
63+
return $this->parserServiceFactory;
6464
}
6565

6666
/**
6767
* @return genderizer\GenderizerServiceFactory
6868
*/
69-
public function genderizerServiceFactory() {
69+
public function genderizerServices() {
7070
if ($this->genderizerServiceFactory==null) {
7171
$this->genderizerServiceFactory = new genderizer\GenderizerServiceFactory($this->context);
7272
}
@@ -76,7 +76,7 @@ public function genderizerServiceFactory() {
7676
/**
7777
* @return matcher\MatcherServiceFactory
7878
*/
79-
public function matcherServiceFactory() {
79+
public function matcherServices() {
8080
if ($this->matcherServiceFactory==null) {
8181
$this->matcherServiceFactory = new matcher\MatcherServiceFactory($this->context);
8282
}
@@ -86,7 +86,7 @@ public function matcherServiceFactory() {
8686
/**
8787
* @return formatter\FormatterServiceFactory
8888
*/
89-
public function formatterServiceFactory() {
89+
public function formatterServices() {
9090
if ($this->formatterServiceFactory==null) {
9191
$this->formatterServiceFactory = new formatter\FormatterServiceFactory($this->context);
9292
}
@@ -96,7 +96,7 @@ public function formatterServiceFactory() {
9696
/**
9797
* @return email\EmailServiceFactory
9898
*/
99-
public function emailServiceFactory() {
99+
public function emailServices() {
100100
if ($this->emailServiceFactory==null) {
101101
$this->emailServiceFactory = new email\EmailServiceFactory($this->context);
102102
}

src/org/nameapi/client/services/parser/NameParserServiceFactory.php renamed to src/org/nameapi/client/services/parser/ParserServiceFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
require_once('personnameparser/PersonNameParserService.php');
88

9-
class NameParserServiceFactory {
9+
class ParserServiceFactory {
1010

1111
private $context;
1212
private $personNameParser;

src/org/nameapi/client/services/parser/personnameparser/wsdl/SoapPersonNameParserService.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ public function __construct(array $options = array(), $wsdl = 'http://api.nameap
2222

2323
/**
2424
* @param ParseArguments $parameters
25-
* @access public
26-
* @return parseResponse
2725
*/
2826
public function parse(ParseArguments $parameters) {
2927
return $this->__soapCall('parse', array($parameters))->return;

0 commit comments

Comments
 (0)