OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • How can I use function of inc file in my api inside Phalcon mvc framework
« previous next »
  • Print
Pages: [1]

Author Topic: How can I use function of inc file in my api inside Phalcon mvc framework  (Read 2072 times)

sharif779

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
How can I use function of inc file in my api inside Phalcon mvc framework
« 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 .
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: How can I use function of inc file in my api inside Phalcon mvc framework
« Reply #1 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
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • How can I use function of inc file in my api inside Phalcon mvc framework
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2