SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 43 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


In cases where JFactory and a class both provide a method to return an instance of
the class, you should generally use the JFactory method in preference. If the class
provides a more comprehensive getInstance() method than JFactory, you may
want to use the class method to get an instance tailored specifically for your needs.
The Session
Sessions are used in web applications as a means of providing a temporary storage
facility for the duration of a client's visit. In PHP, we access this data using the global
hash $_SESSION.
Joomla! always provides us with a session, irrespective of whether or not the client
user is logged in. In Joomla! instead of accessing the $_SESSION hash, we use
the global session object to get and set session data. Session data is stored in
namespaces; the default namespace is default. In this example, we retrieve the
value of default.example:
$session =& JFactory::getSession();
$value = $session->get('example');
Getting Started
[ 32 ]
If we want to retrieve a value from a namespace other than default, we must also
specify a default value.


Pages:
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6