Welcome Guest, Not a member yet? Register   Sign In
is loading through static class is bad idea?
#1

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
Reply


Messages In This Thread
is loading through static class is bad idea? - by kharota - 06-12-2017, 10:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB