/** * Instatiating of singletone * * @return type */ public static function getInstance($view) { if (empty(self::$instance)) { self::$instance = new AdsStorage($view); } return self::$instance; }