Where to put data logic not related with database? |
I am retrieving data from files (with library), then parsing it (with ?) and then saving parsed data into database (with model). I want this three steps separated. Where should I put parser?
Models in CodeIgniter are binded with database tables ($table variable is mandatory) and libraries should be used for common things, not for a specific jobs. I was thinking models should be used for working with any data, not only for database related things. But binding models with tables confusing me. Thank you for your suggestions.
Create new layer in app/Services. Write some functional inside
PHP Code: // app/Services/TextWriter.php
Simple CI 4 project for beginners codeigniter-expenses
|
Welcome Guest, Not a member yet? Register Sign In |