In PHP, you can’t have two classes that share the same name. It becomes a problem when your code grows such as a third party class library could happen to have a class the same as yours. Introduced in version 5.3, PHP namespaces allow us to circumvent this issue. Namespace helps to avoid naming collision and also organizes our code into “packages”. Modern PHP frameworks such as Laravel and CodeIgniter also use namespace to package code into smaller components. It is necessary for phpGrid to support namespace as more people are integrating phpGrid with those frameworks.
We are happy to announce that PHP namespaces support in phpGrid is coming soon. Still not sure what that means? Don’t be alert! The good news is that it requires little changes in your existing phpGrid code. All you will need is to add the following in the first line.
That’s all you will have to do. There’s really nothing special about it.