I am working on a API integration in magento2. That API have two php file with there own functions, that I want to call in our controller to implement respective process. I have placed that API library files in parallel with our controller file like -
Our controller - app/code/Mycompany/CustomerAttribute/Controller/Coral/test.php
And library core php files -
app/code/Mycompany/CustomerAttribute/Controller/Coral/Lib/fileOne.php
app/code/Mycompany/CustomerAttribute/Controller/Coral/Lib/fileTwo.php
in our test.php controller file I am calling above files as -
use Magento\Customer\Model\Url;
use Magento\Store\Model\ScopeInterface;
use Magento\Framework\Mail\Template\TransportBuilder;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\App\Area;
use Magento\Framework\Event\ObserverInterface;
**require 'Lib/fileOne.php';**
and trying to create object like this -
$obj = new FileOne(array(
'appId' => $AppId,
'key' => $Key
));
But after executing above statement its showing nothing;
Is this a right approach or I am doing something wrong in current method ?