what is the meaning of container term used in pear

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
genux33
Forum Newbie
Posts: 18
Joined: Sun Apr 10, 2005 8:22 am

what is the meaning of container term used in pear

Post 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."
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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)
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post by fastfingertips »

In order to group the classes you will use containers.
Post Reply