2017 © Pedro Peláez
 

yii2-extension yii2-hydraphp

PHP Builder for ERP Hydra API

image

gudik/yii2-hydraphp

PHP Builder for ERP Hydra API

  • Thursday, October 5, 2017
  • by gudik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

CircleCI, (*1)

Simplest API for Latera Hydra Billing on PHP, (*2)

Install

composer require gudik/yii2-hydraphp

Test

vendor/bin/phpunit

Use

Before use you will need to Packages: SI_PERSONS_PKG.pls, SI_SUBJECTS_PKG.pls and others. Can get them from Hydra database using Oracle sqlDeveloper and save to ./src/hydra/packages/, (*3)

Common requirements

 'ip/dbName',
    'username' => 'userName',
    'password' => 'userPassword',
    'plIp' => 'hydraAppIp',
    'plUser' => 'hydraAppUserName',
    'plPassword' => 'hydraAppUserPassword',
    'plCode' => 'hydraAppApplicationName',
    'plApplicationId' => 'HYDRA_PHP',
]);

$hydra = new Builder();
$person = $hydra->create('SI_PERSONS_PKG.SI_PERSONS_PUT');
$person->SURNAME = 'Surname1';
$person->FIRST_NAME = 'Firstname2';
$person->SECOND_NAME = 'Secondname3';
$person->REM = 'Comment';
OCIHelper::create($connection, $hydra)->execute();
?>

Linking entities

    ...
    $faker = $this->faker();
    // Create Hydra entities
    $hydra = new Builder();
    $person = $hydra->create('SI_PERSONS_PKG.SI_PERSONS_PUT');
    $user = $hydra->create('SI_SUBJECTS_PKG.SI_SUBJECTS_PUT');
    $account = $hydra->create('SI_SUBJECTS_PKG.SI_SUBJ_ACCOUNTS_PUT');
    // Fill entity Person 
    $person->SURNAME = $faker->lastName;
    $person->FIRST_NAME = $faker->firstName;
    $person->SECOND_NAME = $faker->firstName;
    $person->REM = $faker->text;
    // Fill entity User
    $user->CODE = $faker->userName;
    $user->SUBJ_TYPE_ID = 2001;
    $user->SUBJ_GROUP_ID = 53640201;
    // Link User and Person on Person->SUBJECT_ID <= User->BASE_SUBJECT_ID
    $user->BASE_SUBJECT_ID($person->SUBJECT_ID());
    // Fill entity Account
    $account->ACCOUNT_TYPE_ID = 2042;
    $account->CURRENCY_ID = 1044;
    // Link Account and User on User->SUBJECT_ID <= Account->SUBJECT_ID
    $account->SUBJECT_ID($user->SUBJECT_ID());
    // Add another User for Person
    $otherUser = $hydra->create('SI_SUBJECTS_PKG.SI_SUBJECTS_PUT');
    $otherUser->CODE = $faker->userName;
    $otherUser->SUBJ_TYPE_ID = 2001;
    $otherUser->SUBJ_GROUP_ID = 53640201;
    $otherUser->BASE_SUBJECT_ID($person->SUBJECT_ID());
    // Build and run pl/sql
    OCIHelper::create($connection, $hydra)->execute();
    ...

The Versions

05/10 2017

dev-master

9999999-dev

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

05/10 2017

1.2.4

1.2.4.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

03/10 2017

1.2.3

1.2.3.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

03/10 2017

1.2.2

1.2.2.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

16/09 2017

1.2.1

1.2.1.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

10/09 2017

1.2

1.2.0.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2

01/09 2017

1.1

1.1.0.0

PHP Builder for ERP Hydra API

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Aleksey Klimov

yii2 hydra yii 2