get_declared_classes returns only files that are required in scope of current script so this function call must be dont exactly here. 
I know it's not most effective way to find classes but I can't think about any other solution.