Yii Framework Forum: Returning An Array From A Parser Called From A Controller? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Returning An Array From A Parser Called From A Controller? Rate Topic: -----

#1 User is offline   U4EA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 146
  • Joined: 04-November 12

Posted 07 February 2013 - 06:59 AM

Hi folks,

I currently have a system with a parser that runs in the background via crontab. I also have a menu button from where I can run a controller that in turn calls the parser to run. The parser controller has it's own view and I have set this up so I can periodically run the parser from the frontend in order to check it is running correctly.

Right now, the errors simply echo directly from the parser itself and this, I know, is a bit cheap and dirty. What I would like to do it to have a system where the parser populates an array with chronological messages stating if each stage of the parser has passed/failed. I would like to somehow return this to the controller and iterate the array for ECHOing in the frontend.

Is there anyway this can be done or does this simply break too many rules? The other I would have, I guess, would be to create a DB to store this information, model it then truncate the table and enter a new active record each time the parser is run.

Any thoughts?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users