Page 1 of 1

what is the meaning of container term used in pear

Posted: Sat Jul 02, 2005 10:25 am
by genux33
Anyone who use pear before would come across of the term "container".
What is the meaning of it?
Could someone explain to me, as my english is not too good.

Taking about the example below

" The LiveUser class takes care of the login process and can be configured
to use a certain permission container and one or more different auth containers.
That means, you can have your users' data scattered amongst many data containers
and have the LiveUser class try each defined container until the user is found.
For example, you can have all website users who can apply for a new account online
on the webserver's local database. Also, you want to enable all your company's
employees to login to the site without the need to create new accounts for all of
them. To achieve that, a second container can be defined to be used by the LiveUser class.

You can also define a permission container of your choice that will manage the rights for
each user. Depending on the container, you can implement any kind of permission schemes
for your application while having one consistent API."

Posted: Sat Jul 02, 2005 12:02 pm
by timvw
Well, i'm not a native english speaker either.. Anyway, here is my try

"container" comes from the verb "to contain".

So basically a container is something that contains/holds something.
-> A data container is something that holds data
-> A window container is something that holds windows
-> An auth container is something that holds authentication methods

More specific, the class Auth has some generic methods that allow you to login, logout, validate the user. But you can store the credentials in a flat file, database, ldap tree, ... (== credential containers)

Posted: Mon Jul 25, 2005 7:34 am
by fastfingertips
In order to group the classes you will use containers.