Check if a file exists in Yii

Sergi Juanola picture Sergi Juanola · Feb 4, 2013 · Viewed 8.8k times · Source

I am creating a bunch of modules that all extend a base module. However, some actions need to override the base view. In that case, I'd like to check if the new module has a view in its structure. If it does, use that view, and otherwise use the base one. Now, my question:

Is there a way to check if a file exists in Yii, using the typical alias structure application.views.user.basic_view without using or importing it?