what is the difference between a class and a library?

后端 未结 3 952
野的像风
野的像风 2020-12-31 15:09

I googled, and was informed that a library is made up of multiple relevant classes. But in Codeigniter, I found that there is virtually only one Class in every Library. Sorr

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-31 15:43

    Checking the CodeIgniter docs:

    When we use the term "Libraries" we are normally referring to the classes that are located in the libraries directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create your own libraries within your application/libraries directory in order to maintain separation between your local resources and the global framework resources.

    I don't think of a "library" as specific to a fixed number of classes or files. Does this quote refer to the specific usage that has you confused?

提交回复
热议问题