Bonjour
En lisant le code source de joomla, j'ai vu quelques fonctions avec le signe "&" avant le nom
ça sert à quoi ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 function & getInstance($id = 'Joomla') { static $instances; if (!isset ($instances)) { $instances = array (); } if (empty ($instances[$id])) { $instances[$id] = new JMail(); } return $instances[$id]; } /** * @return mixed True if successful, a JError object otherwise */ function &Send() { if ( ( $this->Mailer == 'mail' ) && ! function_exists('mail') ) { return JError::raiseNotice( 500, JText::_('MAIL_FUNCTION_DISABLED') ); } @ $result = parent::Send(); if ($result == false) { // TODO: Set an appropriate error number $result =& JError::raiseNotice( 500, JText::_($this->ErrorInfo) ); } return $result; }
Merci d'avance
Partager