hirmeos/entity-fishing-php-wrapper

This is a PHP library/wrapper of the NERD API. High level method calls that parse the JSON API response to PHP classes for ease of use.

1.0.1 2018-09-27 00:00 UTC

This package is not auto-updated.

Last update: 2025-07-15 22:10:14 UTC


README

This is a PHP library/wrapper of the NERD API. High level method calls that parse the JSON API response to PHP classes for ease of use.

Installation

Method 1

Just copy the following files in your project:

  1. Folder: Domain
  2. Folder: WebResponse
  3. File: EFWebServiceManager.php

Method 2

Method 2 relies on Packagist (https://packagist.org/)

{
    "require": {

  	    "hirmeos/entity-fishing-php-wrapper" : "*"
    }
}

See the composer documentation here: https://packagist.org/ and here: https://getcomposer.org/doc/01-basic-usage.md#package-versions

Usage

Include: EFWebServiceManager.php in your file

require_once('EFWebServiceManager.php');

Disambiguate Text

EFWebServiceManager::disambiguateText(String searchText, String lang);

Returns object of type: EFDisambiguateTextWebResponse

Disambiguate Short Text

EFWebServiceManager::disambiguateShortText(String searchText, String lang);

Returns object of type: EFDisambiguateShortTextWebResponse

Disambiguate Term Vector

EFWebServiceManager::disambiguateTermVector(Array searchText, String lang);

Returns object of type: EFDisambiguateTermWebResponse

Disambiguate PDF

EFWebServiceManager::disambiguatePDF(String pdf_file_path, String lang);

Returns object of type: EFDisambiguatePDFWebResponse

Concept

EFWebServiceManager::concept(int concept_id, String lang);

Returns object of type: EFConceptWebResponse

Term

EFWebServiceManager::term(int term_id, String lang);

Returns object of type: EFTermWebResponse

Language

EFWebServiceManager::language(String text);

Returns object of type: EFLanguageWebResponse

Segmentation

EFWebServiceManager::segmentation(String text);

Returns object of type: EFSegmentationWebResponse

Responses

All response objects have the following three public variables:

public $has_error;

public $status_code;

public $error_msg;

Use the variables to check for API request errors before proceeding to the actual response data.