Provent getAttribute() from calling static methods