OPNsense Forum

English Forums => General Discussion => Topic started by: sharif779 on January 30, 2019, 10:48:22 am

Title: How can I use function of inc file in my api inside Phalcon mvc framework
Post by: sharif779 on January 30, 2019, 10:48:22 am
Dear all,
When I used
Code: [Select]
get_interfaces_info() this function from interfaces.inc in my api controller then following error occurred
Code: [Select]
{"errorMessage":"[color=red]Error at /usr/local/etc/inc/interfaces.inc:4827 - Undefined index: status (errno=8)"}[/color] . But when I used same function on my static php page inside
Code: [Select]
/usr/local/www/   there is no error occurred.

Is it possible that function inside api controller.If possible then how can I use it?
I am using 17.7 .
Title: Re: How can I use function of inc file in my api inside Phalcon mvc framework
Post by: franco on January 30, 2019, 12:18:49 pm
This isn't possible. MVC code and static code have different implementations to ensure a clean transition away from static code at some point in the future.


Cheers,
Franco