I've been writing a rather complicated module as of late. One of the steps I need to do is pre-populate one of the models with all of the data it needs to work right. This data is slowly replaced using a syncing system / rest calls from our database software, but it needs to be there initially so the end user doesn't think its 'all missing' before this sync happens.
I've been trying to use a csv file in my module directory. For the life of me, I can't figure out the combination of factories and methods to get that folder. I can't assume its going to be in ANY particular place though, since this module will end up on a CDN hosted platform.
I've tried injecting
as well as direct php
__DIR__ dir() dirname() $_SERVER (ugh)
None of this can figure out
while developing.. and
when testing the composer distribution.
Any suggestions are welcome. I need to load the full path to use something like this....
$csv = file($pathThatWasFound);
EDIT: I read http://alanstorm.com/magento_base_directories <--- based on 1.x magento. I need 2.0 suggestions
EDIT: I may be bumping into constraints of FILE magic and xdebug (https://stackoverflow.com/questions/4924676/how-can-i-get-the-php-magic-constant-file-work-with-eclipse-and-pdt)