Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14115

is loading through static class is bad idea?

$
0
0
hi

i use following class to load the views like

Load::view("welcome.php");

is it bad idea? or its fine? i am not sure for using lots of instances? 


<?php 

    Class Load{


       static function view($view, $data = null){
           $obj =& get_instance();
           return $obj->load->view($view, $data);
       }


        static function model($model){
            $obj =& get_instance();
            return $obj->load->model($model);
        }


        static function library($lib, $config = null, $obj_name = null){
            $obj =& get_instance();
            return $obj->load->library($lib, $config, $obj_name);
        }


        static function helper($helper){
            $obj =& get_instance();
            return $obj->load->helper($helper);
        }


?>


thank

Viewing all articles
Browse latest Browse all 14115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>