diff --git a/doc/contrib/contrib.docbook b/doc/contrib/contrib.docbook index d63b05db..b633a938 100644 --- a/doc/contrib/contrib.docbook +++ b/doc/contrib/contrib.docbook @@ -82,7 +82,7 @@ les possibilités de contribution. * * @author My Name * - * @retval boolean true if my addon is totaly supported, false in other cases + * @return boolean true if my addon is totaly supported, false in other cases **/ function LSaddon_myaddon_support() { @@ -128,7 +128,7 @@ les possibilités de contribution. * * @author My Name * - * @retval [type(s) of returned values (pipe separator)] Description of the return of this function + * @return [type(s) of returned values (pipe separator)] Description of the return of this function **/ function myaddon_first_function($arg1, $arg2) { // Do some stuff @@ -257,7 +257,7 @@ les possibilités de contribution. * * @author My Name * - * @retval void + * @return void **/ function myaddon_view() { // Do some stuff and set some template variables @@ -431,7 +431,7 @@ les possibilités de contribution. * * Description of this CLI command. * - * @param[in] $command_args array Command arguments + * @param array $command_args Command arguments * - Positional arguments : * - LSobject * - dn @@ -440,7 +440,7 @@ les possibilités de contribution. * * @author My Name * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ function cli_my_custom_cli_cmd($command_args) { $objType = null; @@ -480,12 +480,12 @@ les possibilités de contribution. /** * Args autocompleter for CLI my_custom_cli_cmd command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param array $command_args List of already typed words of the command + * @param int $comp_word_num The command word number to autocomplete + * @param string $comp_word The command word to autocomplete + * @param array $opts List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_my_custom_cli_cmd_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-f', '--force')); diff --git a/src/includes/addons/LSaddons.LSaccessRightsMatrixView.php b/src/includes/addons/LSaddons.LSaccessRightsMatrixView.php index a02fcf1a..a6b3fc1f 100644 --- a/src/includes/addons/LSaddons.LSaccessRightsMatrixView.php +++ b/src/includes/addons/LSaddons.LSaccessRightsMatrixView.php @@ -31,7 +31,7 @@ LSerror :: defineError('LSACCESSRIGHTSMATRIXVIEW_SUPPORT_01', * * @author Benjamin Renard * - * @retval boolean true if LSaccessRightsMatrixView addon is totally supported, false in other case + * @return boolean true if LSaccessRightsMatrixView addon is totally supported, false in other case */ function LSaddon_LSaccessRightsMatrixView_support() { $retval = True; diff --git a/src/includes/addons/LSaddons.asterisk.php b/src/includes/addons/LSaddons.asterisk.php index e3f1b766..c7241fec 100644 --- a/src/includes/addons/LSaddons.asterisk.php +++ b/src/includes/addons/LSaddons.asterisk.php @@ -41,7 +41,7 @@ LSerror :: defineError('ASTERISK_03', * * @author Benjamin Renard * - * @retval boolean true if Asterisk is totally supported, false in other case + * @return boolean true if Asterisk is totally supported, false in other case */ function LSaddon_asterisk_support() { $retval=true; @@ -72,10 +72,10 @@ LSerror :: defineError('ASTERISK_03', * * This function can be used as encode_function of LSattr_ldap :: password. * - * @param[in] $ldapObject LSldapObject The LSldapObject use to build the hashed password - * @param[in] $clearPassword string The password in clear text + * @param LSldapObject $ldapObject The LSldapObject use to build the hashed password + * @param string $clearPassword The password in clear text * - * @retval string The hashed password + * @return string The hashed password */ function hashAsteriskPassword($ldapObject,$clearPassword) { if (!is_a($ldapObject,'LSldapObject')) { @@ -94,9 +94,9 @@ LSerror :: defineError('ASTERISK_03', * * @author Benjamin Renard * - * @param[in] $ldapObject The LSldapObject + * @param LSldapObject $ldapObject The LSldapObject * - * @retval string asterisk MD5 hashed password or False + * @return string asterisk MD5 hashed password or False */ function generate_asteriskMD5HashedPassword($ldapObject) { if ( get_class($ldapObject -> attrs[ LS_ASTERISK_USERPASSWORD_ATTR ]) != 'LSattribute' ) { diff --git a/src/includes/addons/LSaddons.dyngroup.php b/src/includes/addons/LSaddons.dyngroup.php index fd05fb5a..d4aebeec 100644 --- a/src/includes/addons/LSaddons.dyngroup.php +++ b/src/includes/addons/LSaddons.dyngroup.php @@ -44,7 +44,7 @@ LSerror :: defineError('DYNGROUP_02', * * @author Benjamin Renard * - * @retval boolean true if dyngroup are fully supported, false otherwise + * @return boolean true if dyngroup are fully supported, false otherwise */ function LSaddon_dyngroup_support() { $retval = true; @@ -82,9 +82,9 @@ function LSaddon_dyngroup_support() { /* * Parse LDAP search URI * - * @param[in] $uri string The LDAP search URI to parse + * @param string $uri The LDAP search URI to parse * - * @retval array|false Array of parsed LDAP search URI info, or false + * @return array|false Array of parsed LDAP search URI info, or false */ function parseLdapSearchURI($uri) { $uri_parts = explode('?', $uri); @@ -103,9 +103,9 @@ function parseLdapSearchURI($uri) { /* * Extract attributes cited in an LDAP filter string * - * @param[in] $filter string The LDAP filter string + * @param string $uri The LDAP filter string * - * @retval array|false Array of the attributes cited in the LDAP filter string, or false + * @return array|false Array of the attributes cited in the LDAP filter string, or false */ function extractAttributesFromLdapFilterString($filter) { if ($filter[0] != '(') @@ -122,9 +122,9 @@ function extractAttributesFromLdapFilterString($filter) { * * @author Benjamin Renard * - * @param[in] $ldapObject The LSldapObject + * @param LSldapObject $ldapObject The LSldapObject * - * @retval array|null array of memberUid URI attribute values or null in case of error + * @return array|null array of memberUid URI attribute values or null in case of error */ function generateDyngroupMemberUidURI($ldapObject) { if (!isset($ldapObject -> attrs[ DYNGROUP_MEMBER_DN_URI_ATTRIBUTE ])) { @@ -155,9 +155,9 @@ function generateDyngroupMemberUidURI($ldapObject) { * * @author Benjamin Renard * - * @param[in] $dyngroup The LSldapObject + * @param LSldapObject $dyngroup The LSldapObject * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ function updateDynGroupMembersCache($dyngroup, $reload=true) { if ($reload && !$dyngroup -> reloadData()) { diff --git a/src/includes/addons/LSaddons.exportSearchResultAsCSV.php b/src/includes/addons/LSaddons.exportSearchResultAsCSV.php index f113941a..905813e7 100644 --- a/src/includes/addons/LSaddons.exportSearchResultAsCSV.php +++ b/src/includes/addons/LSaddons.exportSearchResultAsCSV.php @@ -50,7 +50,7 @@ LSerror :: defineError('LS_EXPORTSEARCHRESULTASCSV_03', * * @author Benjamin Renard * - * @retval boolean true if exportSearchResultAsCSV is fully supported, false in other case + * @return boolean true if exportSearchResultAsCSV is fully supported, false in other case */ function LSaddon_exportSearchResultAsCSV_support() { $retval=true; @@ -79,11 +79,11 @@ LSerror :: defineError('LS_EXPORTSEARCHRESULTASCSV_03', /** * Write LSsearch result as CSV and force download of it. * - * @param[in] $LSsearch The LSsearch object + * @param LSsearch $LSsearch The LSsearch object * * @author Benjamin Renard * - * @retval boolean Void if CSV file is successfully generated and upload, false in other case + * @return boolean Void if CSV file is successfully generated and upload, false in other case */ function exportSearchResultAsCSV($LSsearch) { $csv = fopen('php://temp/maxmemory:'. (5*1024*1024), 'r+'); @@ -139,12 +139,12 @@ LSerror :: defineError('LS_EXPORTSEARCHRESULTASCSV_03', /** * Write CSV row in file * - * @param[in] $csv The CSV file description reference - * @param[in] $row An array of a CSV row fields to write + * @param resource &$csv The CSV file description reference + * @param array[string] $row An array of a CSV row fields to write * * @author Benjamin Renard * - * @retval boolean True if CSV row is successfully writed, false in other case + * @return boolean True if CSV row is successfully writed, false in other case */ function writeRowInCSV(&$csv, &$row) { if (!defined('PHP_VERSION_ID') or PHP_VERSION_ID < 50504) { diff --git a/src/includes/addons/LSaddons.ftp.php b/src/includes/addons/LSaddons.ftp.php index ac8448b8..2f829069 100644 --- a/src/includes/addons/LSaddons.ftp.php +++ b/src/includes/addons/LSaddons.ftp.php @@ -58,7 +58,7 @@ LSerror :: defineError('FTP_05', * * @author Benjamin Renard * - * @retval boolean true si FTP est pleinement supporté, false sinon + * @return boolean true si FTP est pleinement supporté, false sinon */ function LSaddon_ftp_support() { $retval=true; @@ -84,12 +84,12 @@ LSerror :: defineError('FTP_05', * * @author Benjamin Renard * - * @param[in] $host string Le nom ou l'IP du serveur FTP - * @param[in] $port string Le port de connexion au serveur ftp - * @param[in] $user string Le nom d'utilidateur de connexion - * @param[in] $pwd string Le mot de passe de connexion + * @param string $host Le nom ou l'IP du serveur FTP + * @param string $port Le port de connexion au serveur ftp + * @param string $user Le nom d'utilidateur de connexion + * @param string $pwd Le mot de passe de connexion * - * @retval mixed Net_FTP object en cas de succès, false sinon + * @return mixed Net_FTP object en cas de succès, false sinon */ function connectToFTP($host,$port,$user,$pwd) { $cnx = new Net_FTP(); @@ -117,13 +117,13 @@ LSerror :: defineError('FTP_05', * * @author Benjamin Renard * - * @param[in] $host string Le nom ou l'IP du serveur FTP - * @param[in] $port string Le port de connexion au serveur ftp - * @param[in] $user string Le nom d'utilidateur de connexion - * @param[in] $pwd string Le mot de passe de connexion - * @param[in] $dirs array ou string Le(s) dossier(s) à ajouter + * @param string $host Le nom ou l'IP du serveur FTP + * @param string $port Le port de connexion au serveur ftp + * @param string $user Le nom d'utilidateur de connexion + * @param string $pwd Le mot de passe de connexion + * @param array $dirs ou string Le(s) dossier(s) à ajouter * - * @retval string True ou false si il y a un problème durant la création du/des dossier(s) + * @return string True ou false si il y a un problème durant la création du/des dossier(s) */ function createDirsByFTP($host,$port,$user,$pwd,$dirs,$chmod=NULL) { $cnx = connectToFTP($host,$port,$user,$pwd); @@ -164,13 +164,13 @@ LSerror :: defineError('FTP_05', * * @author Benjamin Renard * - * @param[in] $host string Le nom ou l'IP du serveur FTP - * @param[in] $port string Le port de connexion au serveur ftp - * @param[in] $user string Le nom d'utilidateur de connexion - * @param[in] $pwd string Le mot de passe de connexion - * @param[in] $dirs array ou string Le(s) dossier(s) à supprimer + * @param string $host Le nom ou l'IP du serveur FTP + * @param string $port Le port de connexion au serveur ftp + * @param string $user Le nom d'utilidateur de connexion + * @param string $pwd Le mot de passe de connexion + * @param array $dirs ou string Le(s) dossier(s) à supprimer * - * @retval string True ou false si il y a un problème durant la suppression du/des dossier(s) + * @return string True ou false si il y a un problème durant la suppression du/des dossier(s) */ function removeDirsByFTP($host,$port,$user,$pwd,$dirs) { $cnx = connectToFTP($host,$port,$user,$pwd); @@ -199,14 +199,14 @@ LSerror :: defineError('FTP_05', * * @author Benjamin Renard * - * @param[in] $host string Le nom ou l'IP du serveur FTP - * @param[in] $port string Le port de connexion au serveur ftp - * @param[in] $user string Le nom d'utilidateur de connexion - * @param[in] $pwd string Le mot de passe de connexion - * @param[in] $old string Le dossier à renomer - * @param[in] $new string Le nouveau nom du dossier à renomer + * @param string $host Le nom ou l'IP du serveur FTP + * @param string $port Le port de connexion au serveur ftp + * @param string $user Le nom d'utilidateur de connexion + * @param string $pwd Le mot de passe de connexion + * @param string $old Le dossier à renomer + * @param string $new Le nouveau nom du dossier à renomer * - * @retval string True ou false si il y a un problème durant le renomage du/des dossier(s) + * @return string True ou false si il y a un problème durant le renomage du/des dossier(s) */ function renameDirByFTP($host,$port,$user,$pwd,$old,$new) { $cnx = connectToFTP($host,$port,$user,$pwd); diff --git a/src/includes/addons/LSaddons.mail.php b/src/includes/addons/LSaddons.mail.php index eea22dc0..9a2c80a3 100644 --- a/src/includes/addons/LSaddons.mail.php +++ b/src/includes/addons/LSaddons.mail.php @@ -44,7 +44,7 @@ LSerror :: defineError('MAIL_01', * * @author Benjamin Renard * - * @retval boolean true si MAIL est pleinement supporté, false sinon + * @return boolean true si MAIL est pleinement supporté, false sinon */ function LSaddon_mail_support() { $retval=true; @@ -87,7 +87,7 @@ LSerror :: defineError('MAIL_01', * * @author Benjamin Renard * - * @retval boolean true si MAIL est pleinement supporté, false sinon + * @return boolean true si MAIL est pleinement supporté, false sinon */ function sendMail($to, $subject, $msg, $headers=array(), $attachments=array(), $eol="\n", $encoding="utf8", $html=false) { global $MAIL_SEND_PARAMS, $MAIL_HEARDERS; diff --git a/src/includes/addons/LSaddons.maildir.php b/src/includes/addons/LSaddons.maildir.php index 1b69a6b8..8e08644e 100644 --- a/src/includes/addons/LSaddons.maildir.php +++ b/src/includes/addons/LSaddons.maildir.php @@ -49,7 +49,7 @@ LSerror :: defineError('MAILDIR_04', * * @author Benjamin Renard * - * @retval boolean true si Maildir est pleinement supporté, false sinon + * @return boolean true si Maildir est pleinement supporté, false sinon */ function LSaddon_maildir_support() { $retval=true; @@ -83,11 +83,11 @@ $retval=true; * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap - * @param[in] $dir Le chemin de la maildir. Si défini, la valeur ne sera pas + * @param LSldapObject $ldapObject L'objet ldap + * @param string $dir Le chemin de la maildir. Si défini, la valeur ne sera pas * récupérée dans le ldapObject * - * @retval string True ou false si il y a un problème durant la création de la Maildir + * @return string True ou false si il y a un problème durant la création de la Maildir */ function createMaildirByFTP($ldapObject,$dir=null) { if (!$dir) { @@ -113,11 +113,11 @@ $retval=true; * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap - * @param[in] $dir Le chemin de la maildir. Si défini, la valeur ne sera pas + * @param LSldapObject $ldapObject L'objet ldap + * @param string $dir Le chemin de la maildir. Si défini, la valeur ne sera pas * récupérée dans le ldapObject * - * @retval string True ou false si il y a un problème durant la suppression de la Maildir + * @return string True ou false si il y a un problème durant la suppression de la Maildir */ function removeMaildirByFTP($ldapObject,$dir=null) { if (!$dir) { @@ -138,9 +138,9 @@ $retval=true; * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval string Le chemin distant de la maildir ou false si il y a un problème + * @return string Le chemin distant de la maildir ou false si il y a un problème */ function getMaildirPath($ldapObject) { $dir = getFData(LS_MAILDIR_FTP_MAILDIR_PATH,$ldapObject,'getValue'); @@ -167,10 +167,10 @@ $retval=true; * * @author Benjamin Renard * - * @param[in] $old L'ancien chemin de la maildir - * @param[in] $new Le nouveau chemin de la maildir + * @param string $old L'ancien chemin de la maildir + * @param string $new Le nouveau chemin de la maildir * - * @retval string True ou false si il y a un problème durant le renomage de la Maildir + * @return string True ou false si il y a un problème durant le renomage de la Maildir */ function renameMaildirByFTP($old,$new) { if (!renameDirByFTP(LS_MAILDIR_FTP_HOST,LS_MAILDIR_FTP_PORT,LS_MAILDIR_FTP_USER,LS_MAILDIR_FTP_PWD,$old,$new)) { diff --git a/src/includes/addons/LSaddons.mailquota.php b/src/includes/addons/LSaddons.mailquota.php index 0096a8d4..2d55e7b1 100644 --- a/src/includes/addons/LSaddons.mailquota.php +++ b/src/includes/addons/LSaddons.mailquota.php @@ -49,7 +49,7 @@ LSerror :: defineError('MAILQUOTA_04', * * @author Benjamin Renard * - * @retval boolean True if this addons is fully supported, false otherwise + * @return boolean True if this addons is fully supported, false otherwise */ function LSaddon_mailquota_support() { $retval=True; @@ -81,9 +81,9 @@ function LSaddon_mailquota_support() { /** * Get IMAP mailbox usage * - * @param[in] $ldapobject LSldapObject The LDAP object + * @param LSldapObject $ldapobject The LDAP object * - * @retval array|false Array with mailbox usage and quota, or false + * @return array|false Array with mailbox usage and quota, or false **/ function mailquota_get_usage(&$LSldapObject) { $logger = LSlog :: get_logger("LSaddon_mailquota"); @@ -144,9 +144,9 @@ function mailquota_get_usage(&$LSldapObject) { * [...] * ); * - * @param[in] $ldapobject LSldapObject The LDAP object + * @param LSldapObject $ldapobject The LDAP object * - * @retval true in any case + * @return true in any case **/ function mailquota_show_usage(&$LSldapObject) { $quota = mailquota_get_usage($LSldapObject); diff --git a/src/includes/addons/LSaddons.orgchart.php b/src/includes/addons/LSaddons.orgchart.php index 47a6988e..a9bbf397 100644 --- a/src/includes/addons/LSaddons.orgchart.php +++ b/src/includes/addons/LSaddons.orgchart.php @@ -35,7 +35,7 @@ LSerror :: defineError('LSORGCHART_SUPPORT_02', * * @author Benjamin Renard * - * @retval boolean true if orgchart addon is totally supported, false in other case + * @return boolean true if orgchart addon is totally supported, false in other case */ function LSaddon_orgchart_support() { $retval = True; diff --git a/src/includes/addons/LSaddons.phpldapadmin.php b/src/includes/addons/LSaddons.phpldapadmin.php index 29e3ef62..3867cb7f 100644 --- a/src/includes/addons/LSaddons.phpldapadmin.php +++ b/src/includes/addons/LSaddons.phpldapadmin.php @@ -33,7 +33,7 @@ LSerror :: defineError('PHPLDAPADMIN_SUPPORT_01', * * @author Benjamin Renard * - * @retval boolean true if is supported, false also + * @return boolean true if is supported, false also */ function LSaddon_phpldapadmin_support() { $retval=true; @@ -57,7 +57,7 @@ function LSaddon_phpldapadmin_support() { * * @author Benjamin Renard * - * @retval boolean true in all cases + * @return boolean true in all cases */ function redirectToPhpLdapAdmin(&$ldapObject) { $url = $ldapObject->getFData(LS_PHPLDAPADMIN_VIEW_OBJECT_URL_FORMAT); diff --git a/src/includes/addons/LSaddons.posix.php b/src/includes/addons/LSaddons.posix.php index 336ac80d..cc530374 100644 --- a/src/includes/addons/LSaddons.posix.php +++ b/src/includes/addons/LSaddons.posix.php @@ -41,7 +41,7 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @retval boolean true si POSIX est pleinement supporté, false sinon + * @return boolean true si POSIX est pleinement supporté, false sinon */ function LSaddon_posix_support() { @@ -85,9 +85,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval integer uidNumber ou false si il y a un problème durant la génération + * @return integer uidNumber ou false si il y a un problème durant la génération */ function generate_uidNumber($ldapObject) { @@ -120,9 +120,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval integer gidNumber ou false si il y a un problème durant la génération + * @return integer gidNumber ou false si il y a un problème durant la génération */ function generate_gidNumber($ldapObject) { @@ -155,9 +155,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval string homeDirectory ou false si il y a un problème durant la génération + * @return string homeDirectory ou false si il y a un problème durant la génération */ function generate_homeDirectory($ldapObject) { if ( get_class($ldapObject -> attrs[ LS_POSIX_UID_ATTR ]) != 'LSattribute' ) { @@ -176,9 +176,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval string homeDirectory ou false si il y a un problème durant la génération + * @return string homeDirectory ou false si il y a un problème durant la génération */ function createHomeDirectoryByFTP($ldapObject) { $dir = getFData(LS_POSIX_HOMEDIRECTORY_FTP_PATH,$ldapObject,'getValue'); @@ -197,9 +197,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject The LSldapObject + * @param LSldapObject $ldapObject The LSldapObject * - * @retval array|null array of member attribute values or null in case of error + * @return array|null array of member attribute values or null in case of error */ function generateMemberFromMemberUid($ldapObject) { if ( get_class($ldapObject -> attrs[ 'memberUid' ]) != 'LSattribute' ) { @@ -235,9 +235,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $ldapObject The LSldapObject + * @param LSldapObject $ldapObject The LSldapObject * - * @retval array|null array of memberUid values or null in case of error + * @return array|null array of memberUid values or null in case of error */ function generate_memberUidFromUniqueMember($ldapObject) { if ( get_class($ldapObject -> attrs[ 'memberUid' ]) != 'LSattribute' ) { @@ -275,9 +275,9 @@ LSerror :: defineError('POSIX_01', * * @author Benjamin Renard * - * @param[in] $anything anything + * @param mixed $anything anything * - * @retval integer The shadowLastChange attribute value (=current date) + * @return integer The shadowLastChange attribute value (=current date) */ function generate_shadowLastChange($anything) { return time(); diff --git a/src/includes/addons/LSaddons.ppolicy.php b/src/includes/addons/LSaddons.ppolicy.php index b98d1d31..7a86e285 100644 --- a/src/includes/addons/LSaddons.ppolicy.php +++ b/src/includes/addons/LSaddons.ppolicy.php @@ -96,7 +96,7 @@ function LSaddon_ppolicy_support() { /** * Retrieve ppolicy object (from cache if already loaded) * - * @param[in] $dn string The DN of the ppolicy object + * @param string $dn The DN of the ppolicy object * * @return array|false Array of ppolicy object's attributes on success, false otherwise * @@ -112,7 +112,7 @@ function get_ppolicy_object($dn) { /** * Retrieve ppolicy password max age * - * @param[in] $ppolicy_dn string Optional DN of the ppolicy object to use + * @param string $dn Optional DN of the ppolicy object to use * * @return int|null|false The ppolicy password max age (in second) if defined, null if no password max age is defined or false in case of error * @@ -134,9 +134,9 @@ function get_ppolicy_password_max_age($ppolicy_dn=null) { /** * Format and return HTML code of a badge * - * @param[in] $text string The text of the badge - * @param[in] $bg_color string The background color of the badge (optional, default: green) - * @param[in] $color string The text color of the badge (optional, default: white) + * @param string $dn The text of the badge + * @param string $dn The background color of the badge (optional, default: green) + * @param string $dn The text color of the badge (optional, default: white) * * @return string The HTML code of the badge * @@ -157,7 +157,7 @@ function _ppolicy_badge($text, $bg_color='green', $color='white') { /** * Retrieve Ppolicy extraDisplayedColumn password expiration * - * @param[in] $entry An LSsearchEntry object + * @param LSsearchEntry $entry An LSsearchEntry object * * @return string Ppolicy extraDisplayedColumn password expiration * @@ -194,7 +194,7 @@ function ppolicy_extraDisplayColumn_password_expiration($entry) { /** * Write LSsearch result as CSV and force download of it. * - * @param[in] $LSsearch The LSsearch object + * @param LSsearch $LSsearch The LSsearch object * * @author Benjamin Renard * @@ -301,12 +301,12 @@ function ppolicy_export_search_info($LSsearch, $as_csv=true, $return=false) { /** * Write CSV row in file * - * @param[in] $csv The CSV file description reference - * @param[in] $row An array of a CSV row fields to write + * @param resource $csv The CSV file description reference + * @param array[string] $row An array of a CSV row fields to write * * @author Benjamin Renard * - * @retval boolean True if CSV row is successfully writed, false in other case + * @return boolean True if CSV row is successfully writed, false in other case */ function _ppolicy_write_row_in_csv(&$csv, &$row) { if (!defined('PHP_VERSION_ID') or PHP_VERSION_ID < 50504) { @@ -324,7 +324,7 @@ function _ppolicy_write_row_in_csv(&$csv, &$row) { /** * Handle exportPpolicyInfo API request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * * @return void **/ @@ -432,12 +432,12 @@ function cli_export_ppolicy_info($command_args) { /** * Args autocompleter for CLI export_ppolicy_info command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ function cli_export_ppolicy_info_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-o', '--output', '-j', '--json', '-p', '--pretty')); diff --git a/src/includes/addons/LSaddons.samba.php b/src/includes/addons/LSaddons.samba.php index 2bf9206d..61804442 100644 --- a/src/includes/addons/LSaddons.samba.php +++ b/src/includes/addons/LSaddons.samba.php @@ -58,7 +58,7 @@ define('LS_SAMBA_INFINITY_TIME',2147483647); * * @author Benjamin Renard * - * @retval boolean True if Samba is fully supported, false otherwise + * @return boolean True if Samba is fully supported, false otherwise */ function LSaddon_samba_support() { @@ -110,11 +110,11 @@ function LSaddon_samba_support() { * sambaSID = LS_SAMBA_DOMAIN_SID-Number * * @author Benjamin Renard - * @param[in] $ldapObject LSldapObjet The LSldapObjet object - * @param[in] $unix_attr string The UNIX attribute name - * @param[in] $base_number integer The base number value + * @param LSldapObjet $ldapObject The LSldapObjet object + * @param string $unix_attr The UNIX attribute name + * @param integer $base_number The base number value * - * @retval string SambaSID ou false si il y a un problème durant la génération + * @return string SambaSID ou false si il y a un problème durant la génération */ function generate_sambaSID($ldapObject, $unix_attr, $base_number) { if ( get_class($ldapObject -> attrs[ $unix_attr ]) != 'LSattribute' ) { @@ -139,10 +139,10 @@ function generate_sambaSID($ldapObject, $unix_attr, $base_number) { * Number = LS_SAMBA_UIDNUMBER_ATTR * 2 + LS_SAMBA_SID_BASE_USER * sambaSID = LS_SAMBA_DOMAIN_SID-Number * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * @author Benjamin Renard * - * @retval string User SambaSID value on success, false otherwise + * @return string User SambaSID value on success, false otherwise */ function generate_user_sambaSID($ldapObject) { return generate_sambaSID($ldapObject, LS_SAMBA_UIDNUMBER_ATTR, LS_SAMBA_SID_BASE_USER); @@ -156,10 +156,10 @@ function generate_user_sambaSID($ldapObject) { * Number = LS_SAMBA_UIDNUMBER_ATTR * 2 + LS_SAMBA_SID_BASE_USER * sambaSID = LS_SAMBA_DOMAIN_SID-Number * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * @author Benjamin Renard * - * @retval string User SambaSID value on success, false otherwise + * @return string User SambaSID value on success, false otherwise */ function generate_sambaUserSID($ldapObject) { LSerror :: addErrorCode( @@ -179,10 +179,10 @@ function generate_sambaUserSID($ldapObject) { * Number = LS_SAMBA_GIDNUMBER_ATTR * 2 + LS_SAMBA_SID_BASE_GROUP * sambaSID = LS_SAMBA_DOMAIN_SID-Number * - * @param[in] $ldapObject LSldapObjet The group LSldapObjet object + * @param LSldapObjet $ldapObject The group LSldapObjet object * @author Benjamin Renard * - * @retval string Group SambaSID value on success, false otherwise + * @return string Group SambaSID value on success, false otherwise */ function generate_group_sambaSID($ldapObject) { return generate_sambaSID($ldapObject, LS_SAMBA_GIDNUMBER_ATTR, LS_SAMBA_SID_BASE_GROUP); @@ -194,10 +194,10 @@ function generate_group_sambaSID($ldapObject) { * Note: old-name of the function keep for retro-compatibility. An error * message is raised when this function is used. * - * @param[in] $ldapObject LSldapObjet The group LSldapObjet object + * @param LSldapObjet $ldapObject The group LSldapObjet object * @author Benjamin Renard * - * @retval string Group SambaSID value on success, false otherwise + * @return string Group SambaSID value on success, false otherwise */ function generate_sambaGroupSID($ldapObject) { LSerror :: addErrorCode( @@ -217,10 +217,10 @@ function generate_sambaGroupSID($ldapObject) { * Number = LS_SAMBA_GIDNUMBER_ATTR * 2 + LS_SAMBA_SID_BASE_GROUP * sambaSID = LS_SAMBA_DOMAIN_SID-Number * - * @param[in] $ldapObject LSldapObjet The LSldapObjet object + * @param LSldapObjet $ldapObject The LSldapObjet object * @author Benjamin Renard * - * @retval string The sambaPrimaryGroupSID value on success, false otherwise + * @return string The sambaPrimaryGroupSID value on success, false otherwise */ function generate_sambaPrimaryGroupSID($ldapObject) { return generate_sambaSID($ldapObject, LS_SAMBA_GIDNUMBER_ATTR, LS_SAMBA_SID_BASE_GROUP); @@ -232,9 +232,9 @@ function generate_sambaPrimaryGroupSID($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string|false sambaNTPassword value on success, false otherwise + * @return string|false sambaNTPassword value on success, false otherwise */ function generate_sambaNTPassword($ldapObject) { if ( get_class($ldapObject -> attrs[ LS_SAMBA_USERPASSWORD_ATTR ]) != 'LSattribute' ) { @@ -257,9 +257,9 @@ function generate_sambaPrimaryGroupSID($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string|false sambaLMPassword value on success, false otherwise + * @return string|false sambaLMPassword value on success, false otherwise */ function generate_sambaLMPassword($ldapObject) { if ( get_class($ldapObject -> attrs[ LS_SAMBA_USERPASSWORD_ATTR ]) != 'LSattribute' ) { @@ -282,9 +282,9 @@ function generate_sambaPrimaryGroupSID($ldapObject) { * * @author Benjamin Renard * - * @param[in] $attr string The sambaUnixIdPool attribute name that contain next ID value + * @param string $unix_attr The sambaUnixIdPool attribute name that contain next ID value * - * @retval integer UNIX ID value on success, false otherwise + * @return integer UNIX ID value on success, false otherwise */ function get_samba_unix_pool_next_id($attr) { $unix_id_pool_dn = (defined('LS_SAMBA_UNIX_ID_POOL_DN')?constant('LS_SAMBA_UNIX_ID_POOL_DN'):LS_SAMBA_DOMAIN_OBJECT_DN); @@ -316,9 +316,9 @@ function get_samba_unix_pool_next_id($attr) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval integer|false uidNumber value on success, false otherwise + * @return integer|false uidNumber value on success, false otherwise */ function generate_samba_uidNumber($ldapObject) { return get_samba_unix_pool_next_id('uidNumber'); @@ -332,9 +332,9 @@ function generate_samba_uidNumber($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval integer|false uidNumber value on success, false otherwise + * @return integer|false uidNumber value on success, false otherwise */ function generate_uidNumber_withSambaDomainObject($ldapObject) { LSerror :: addErrorCode( @@ -353,9 +353,9 @@ function generate_uidNumber_withSambaDomainObject($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval integer|false gidNumber value on success, false otherwise + * @return integer|false gidNumber value on success, false otherwise */ function generate_samba_gidNumber($ldapObject) { return get_samba_unix_pool_next_id('gidNumber'); @@ -369,9 +369,9 @@ function generate_samba_gidNumber($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval integer|false gidNumber value on success, false otherwise + * @return integer|false gidNumber value on success, false otherwise */ function generate_gidNumber_withSambaDomainObject($ldapObject) { LSerror :: addErrorCode( @@ -390,9 +390,9 @@ function generate_gidNumber_withSambaDomainObject($ldapObject) { * * @author Benjamin Renard * - * @param[in] $anything anything + * @param mixed $anything anything * - * @retval integer NT infinity time + * @return integer NT infinity time */ function get_samba_infinity_time($anything=null) { return LS_SAMBA_INFINITY_TIME; @@ -406,9 +406,9 @@ function get_samba_infinity_time($anything=null) { * * @author Benjamin Renard * - * @param[in] $anything anything + * @param mixed $anything anything * - * @retval integer NT infinity time + * @return integer NT infinity time */ function return_sambaInfinityTime($anything=null) { LSerror :: addErrorCode( @@ -429,9 +429,9 @@ function return_sambaInfinityTime($anything=null) { * * @author Benjamin Renard * - * @param[in] $anything anything + * @param mixed $anything anything * - * @retval integer The sambaPwdLastSet attribute value (=current timestamp) + * @return integer The sambaPwdLastSet attribute value (=current timestamp) */ function generate_sambaPwdLastSet($anything) { return time(); @@ -444,9 +444,9 @@ function generate_sambaPwdLastSet($anything) { * * @author Benjamin Renard * - * @param[in] $anything anything + * @param mixed $anything anything * - * @retval string The sambaDomainName attribute value + * @return string The sambaDomainName attribute value */ function generate_sambaDomainName($anything) { return LS_SAMBA_DOMAIN_NAME; @@ -457,9 +457,9 @@ function generate_sambaDomainName($anything) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string The sambaHomePath attribute value + * @return string The sambaHomePath attribute value */ function generate_sambaHomePath($ldapObject) { return $ldapObject -> getFData(LS_SAMBA_HOME_PATH_FORMAT); @@ -470,9 +470,9 @@ function generate_sambaHomePath($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string The sambaProfilePath attribute value + * @return string The sambaProfilePath attribute value */ function generate_sambaProfilePath($ldapObject) { return $ldapObject -> getFData(LS_SAMBA_PROFILE_PATH_FORMAT); @@ -484,9 +484,9 @@ function generate_sambaProfilePath($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string The shadowExpire attribute value + * @return string The shadowExpire attribute value */ function generate_shadowExpire_from_sambaPwdMustChange($ldapObject) { $time = $ldapObject -> getValue('sambaPwdMustChange', true, null); @@ -500,9 +500,9 @@ function generate_shadowExpire_from_sambaPwdMustChange($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string Timestamp corresponding to shadowExpire + * @return string Timestamp corresponding to shadowExpire */ function generate_timestamp_from_shadowExpire($ldapObject) { $days = $ldapObject -> getValue('shadowExpire', true, null); @@ -517,9 +517,9 @@ function generate_timestamp_from_shadowExpire($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string The sambaPwdMustChange attribute value + * @return string The sambaPwdMustChange attribute value */ function generate_sambaPwdMustChange_from_shadowExpire($ldapObject) { return generate_timestamp_from_shadowExpire($ldapObject); @@ -531,9 +531,9 @@ function generate_sambaPwdMustChange_from_shadowExpire($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject LSldapObjet The user LSldapObjet object + * @param LSldapObjet $ldapObject The user LSldapObjet object * - * @retval string The sambaKickoffTime attribute value + * @return string The sambaKickoffTime attribute value */ function generate_sambaKickoffTime_from_shadowExpire($ldapObject) { return generate_timestamp_from_shadowExpire($ldapObject); diff --git a/src/includes/addons/LSaddons.showTechInfo.php b/src/includes/addons/LSaddons.showTechInfo.php index d0aea6d8..5361176a 100644 --- a/src/includes/addons/LSaddons.showTechInfo.php +++ b/src/includes/addons/LSaddons.showTechInfo.php @@ -25,7 +25,7 @@ * * @author Benjamin Renard * - * @retval boolean true if LSaccessRightsMatrixView addon is totally supported, false in other case + * @return boolean true if LSaccessRightsMatrixView addon is totally supported, false in other case */ function LSaddon_showTechInfo_support() { return True; diff --git a/src/includes/addons/LSaddons.ssh.php b/src/includes/addons/LSaddons.ssh.php index c6766295..cb0f5b02 100644 --- a/src/includes/addons/LSaddons.ssh.php +++ b/src/includes/addons/LSaddons.ssh.php @@ -64,7 +64,7 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @retval boolean true if SSH is fully supported, false otherwise + * @return boolean true if SSH is fully supported, false otherwise */ function LSaddon_ssh_support() { $retval=true; @@ -88,7 +88,7 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @param[in] $params array The SSH connexion parameters : + * @param array $params The SSH connexion parameters : * array ( * 'host' => '[SSH server hostname/IP]', // required * 'port' => [SSH port], // optional, default : 22 @@ -109,9 +109,9 @@ LSerror :: defineError('SSH_07', * 'password' => '[SSH private key file password]' // Only if need * ) * ) - * @param[in] $sftp boolean Enable SFTP mode (default : false) + * @param boolean $sftp Enable SFTP mode (default : false) * - * @retval mixed SSH2/SFTP object or false + * @return mixed SSH2/SFTP object or false */ function connectToSSH($params, $sftp=false) { $logger = LSlog :: get_logger('LSaddon_ssh'); @@ -182,14 +182,14 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @param[in] $connection_params array Connection parameters - * @param[in] $dirs array|string The directory/ies to add - * @param[in] $mode integer The directory/ies mode as an octal number (do not forget leading zero, + * @param array $params Connection parameters + * @param array|string $dirs The directory/ies to add + * @param boolean $sftp The directory/ies mode as an octal number (do not forget leading zero, * example: 0755 or 02755, default : default umask on the SSH server) - * @param[in] $recursive boolean Enable recursive mode (default : false) - * @param[in] $continue boolean Enable continue mode : do not on error (default : false) + * @param boolean $sftp Enable recursive mode (default : false) + * @param boolean $sftp Enable continue mode : do not on error (default : false) * - * @retval boolean + * @return boolean */ function createDirsBySFTP($connection_params, $dirs, $chmod=-1, $recursive=false, $continue=false) { $cnx = connectToSSH($connection_params, true); @@ -216,12 +216,12 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @param[in] $connection_params array Connection parameters - * @param[in] $dirs array|string The directory/ies to remove - * @param[in] $recursive boolean Enable recursive mode (default : false) - * @param[in] $continue boolean Enable continue mode : do not on error (default : false) + * @param array $params Connection parameters + * @param array|string $dirs The directory/ies to remove + * @param boolean $sftp Enable recursive mode (default : false) + * @param boolean $sftp Enable continue mode : do not on error (default : false) * - * @retval boolean + * @return boolean */ function removeDirsBySFTP($connection_params, $dirs, $recursive=false, $continue=false) { $cnx = connectToSSH($connection_params, true); @@ -248,11 +248,11 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @param[in] $connection_params array Connection parameters - * @param[in] $old string The actual directory path to rename - * @param[in] $new string The new directory path + * @param array $params Connection parameters + * @param array $params The actual directory path to rename + * @param array $params The new directory path * - * @retval boolean + * @return boolean */ function renameDirBySFTP($connection_params, $old, $new) { $cnx = connectToSSH($connection_params, true); @@ -272,10 +272,10 @@ LSerror :: defineError('SSH_07', * * @author Benjamin Renard * - * @param[in] $connection_params array Connection parameters - * @param[in] $cmd string The command to run on remote server + * @param array $params Connection parameters + * @param array $params The command to run on remote server * - * @retval mixed False if connection fail and an array otherwise, with + * @return mixed False if connection fail and an array otherwise, with * exit code as first value and the command outup as second * one (stdout + stderr). */ diff --git a/src/includes/addons/LSaddons.supann.php b/src/includes/addons/LSaddons.supann.php index 7479078d..d3c70779 100644 --- a/src/includes/addons/LSaddons.supann.php +++ b/src/includes/addons/LSaddons.supann.php @@ -52,7 +52,7 @@ LSerror :: defineError('SUPANN_04', * * @author Benjamin Renard * - * @retval boolean true si SUPANN est pleinement supporté, false sinon + * @return boolean true si SUPANN est pleinement supporté, false sinon */ function LSaddon_supann_support() { $retval = true; @@ -110,9 +110,9 @@ function LSaddon_supann_support() { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval string Le displayName ou false si il y a un problème durant la génération + * @return string Le displayName ou false si il y a un problème durant la génération */ function generate_displayName($ldapObject) { if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) { @@ -141,9 +141,9 @@ function generate_displayName($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval string Le CN ou false si il y a un problème durant la génération + * @return string Le CN ou false si il y a un problème durant la génération */ function generate_cn($ldapObject) { if ( get_class($ldapObject -> attrs[ $GLOBALS['LS_SUPANN_LASTNAME_ATTR'] ]) != 'LSattribute' ) { @@ -173,9 +173,9 @@ function generate_cn($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut eduPersonOrgUnitDN ou false + * @return array Les valeurs de l'attribut eduPersonOrgUnitDN ou false * si il y a un problème durant la génération */ function generate_eduPersonOrgUnitDN($ldapObject) { @@ -209,9 +209,9 @@ function generate_eduPersonOrgUnitDN($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array La valeur de l'attribut eduPersonPrimaryOrgUnitDN + * @return array La valeur de l'attribut eduPersonPrimaryOrgUnitDN * ou false si il y a un problème durant la génération */ function generate_eduPersonPrimaryOrgUnitDN($ldapObject) { @@ -245,9 +245,9 @@ function generate_eduPersonPrimaryOrgUnitDN($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array La valeur de l'attribut eduPersonOrgDN ou false + * @return array La valeur de l'attribut eduPersonOrgDN ou false * si il y a un problème durant la génération */ function generate_eduPersonOrgDN($ldapObject) { @@ -277,9 +277,9 @@ function generate_eduPersonOrgDN($ldapObject) { * * {SUPANN}S410 * - * @param[in] $val La valeur + * @param string $val La valeur * - * @retval array Un tableau cle->valeur contenant label et value ou False + * @return array Un tableau cle->valeur contenant label et value ou False **/ function supannParseLabeledValue($value) { if (preg_match('/^\{([^\}]*)\}(.*)$/', $value, $m)) { @@ -300,9 +300,9 @@ function supannParseLabeledValue($value) { * * @author Benjamin Renard * - * @param[in] $val La valeur composite + * @param string $val La valeur composite * - * @retval array Un tableau contenant key->value ou false en cas d'erreur + * @return array Un tableau contenant key->value ou false en cas d'erreur **/ function supannParseCompositeValue($val) { // Check value is valid @@ -342,9 +342,9 @@ function supannParseCompositeValue($val) { * * @author Benjamin Renard * - * @param[in] $val Tableau associatif des valeurs + * @param array $val Tableau associatif des valeurs * - * @retval array Un tableau contenant key->value ou false en cas d'erreur + * @return array Un tableau contenant key->value ou false en cas d'erreur **/ function supannFormatCompositeValue($val) { $retval = ""; @@ -361,9 +361,9 @@ function supannFormatCompositeValue($val) { /** * Retourne le nom court d'une entite en fonction de son identifiant * - * @param[in] $id L'identifiant de l'entite (supannCodeEntite) + * @param string $id L'identifiant de l'entite (supannCodeEntite) * - * @retval string Le nom de l'entite + * @return string Le nom de l'entite **/ function supanGetEntiteNameById($id) { if (LSsession::loadLSobject($GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'])) { @@ -379,9 +379,9 @@ function supanGetEntiteNameById($id) { /** * Valide l'ID d'une entite * - * @param[in] $id L'identifiant de l'entite (supannCodeEntite) + * @param string $id L'identifiant de l'entite (supannCodeEntite) * - * @retval boolean True si une entité avec cet ID existe, False sinon + * @return boolean True si une entité avec cet ID existe, False sinon **/ function supannValidateEntityId($id) { if (LSsession::loadLSobject($GLOBALS['LS_SUPANN_LSOBJECT_ENTITE_TYPE'])) { @@ -399,10 +399,10 @@ function supannValidateEntityId($id) { * et retourne un tableau mettant en relation leur identifiant et leur nom * d'affichage. * - * @param[in] $pattern string Le pattern de recherche - * @param[in] $max_matches int Nombre maximum de résultat retournés (optionnel, par défaut : 10) + * @param string $pattern Le pattern de recherche + * @param string $pattern Nombre maximum de résultat retournés (optionnel, par défaut : 10) * - * @retval array Tableau du résultat de la recherche mettant en relation + * @return array Tableau du résultat de la recherche mettant en relation * l'identifiant des entités trouvés avec leur nom d'affichage. **/ function supannSearchEntityByPattern($pattern, $max_matches=10) { @@ -437,9 +437,9 @@ function supannSearchEntityByPattern($pattern, $max_matches=10) { /** * Retourne les infos d'un parrain en fonction de son DN * - * @param[in] $dn Le DN du parrain + * @param string $dn Le DN du parrain * - * @retval array Le nom, le type et le DN du parrain (Format: array('dn' => [DN], 'type' => [type], 'name' => [name])) + * @return array Le nom, le type et le DN du parrain (Format: array('dn' => [DN], 'type' => [type], 'name' => [name])) **/ function supanGetParrainInfoByDN($dn) { $matched = array( @@ -466,9 +466,9 @@ function supanGetParrainInfoByDN($dn) { /** * Valide le DN d'un parrain * - * @param[in] $dn Le DN d'un parrain + * @param string $dn Le DN d'un parrain * - * @retval boolean True si un parrain avec ce DN existe, False sinon + * @return boolean True si un parrain avec ce DN existe, False sinon **/ function supannValidateParrainDN($dn) { $info = supanGetParrainInfoByDN($dn); @@ -479,10 +479,10 @@ function supannValidateParrainDN($dn) { * Cherche des parrains répondant au pattern de recherche passé en paramètres * et retourne un tableau mettant en relation leur DN et leur nom d'affichage. * - * @param[in] $pattern string Le pattern de recherche - * @param[in] $max_matches int Nombre maximum de résultat retournés (optionnel, par défaut : 10) + * @param string $pattern Le pattern de recherche + * @param string $pattern Nombre maximum de résultat retournés (optionnel, par défaut : 10) * - * @retval array Tableau du résultat de la recherche mettant en relation + * @return array Tableau du résultat de la recherche mettant en relation * le DN des parrains trouvés avec leur nom d'affichage. **/ function supannSearchParrainByPattern($pattern, $max_matches=10) { @@ -518,11 +518,11 @@ function supannSearchParrainByPattern($pattern, $max_matches=10) { /** * Vérifie si une valeur et son étiquette sont valide pour une table donnée * - * @param[in] $table La table de nomenclature - * @param[in] $label L'étiquette de la valeur (optionnel) - * @param[in] $value La valeur + * @param string $table La table de nomenclature + * @param string $label L'étiquette de la valeur (optionnel) + * @param string $value La valeur * - * @retval booleab True si valide, False sinon + * @return booleab True si valide, False sinon **/ function supannValidateNomenclatureValue($table, $label, $value) { if (!supannLoadNomenclature($table)) @@ -561,11 +561,11 @@ function supannValidateNomenclatureValue($table, $label, $value) { * Retourne le label d'une valeur en fonction de la table de nomenclature * et de l'étiquette de la valeur. * - * @param[in] $table La table de nomenclature - * @param[in] $label L'étiquette de la valeur (optionnel) - * @param[in] $value La valeur + * @param string $table La table de nomenclature + * @param string $label L'étiquette de la valeur (optionnel) + * @param string $value La valeur * - * @retval array Le label de la valeur. En cas de valeur nor-reconnue, retourne + * @return array Le label de la valeur. En cas de valeur nor-reconnue, retourne * la valeur en spécifiant qu'elle n'est pas reconnue. **/ function supannGetNomenclatureLabel($table, $label, $value) { @@ -578,9 +578,9 @@ function supannGetNomenclatureLabel($table, $label, $value) { /** * Retourne les valeurs possibles d'une table de nomenclature pour chaque fournisseur * - * @param[in] $table La table de nomenclature + * @param string $table La table de nomenclature * - * @retval array Tableau contenant pour chaque fournisseur, les valeurs possibles de + * @return array Tableau contenant pour chaque fournisseur, les valeurs possibles de * la table de nomenclature **/ function supannGetNomenclatureTable($table) { @@ -598,12 +598,12 @@ function supannGetNomenclatureTable($table) { /** * Retourne les valeurs possibles d'une table de nomenclature * - * @param[in] $table La table de nomenclature - * @param[in] $add_provider_label Booléen définissant si le fournisseur de la valeur + * @param string $table La table de nomenclature + * @param bool $add_provider_label Booléen définissant si le fournisseur de la valeur * doit être ajouté en tant qu'étiquette de la valeur * (optinel, par défaut: vrai) * - * @retval array Tableau contenant les valeurs possibles de la table + * @return array Tableau contenant les valeurs possibles de la table * de nomenclature **/ function supannGetNomenclaturePossibleValues($table, $add_provider_label=True) { @@ -626,10 +626,10 @@ function supannGetNomenclaturePossibleValues($table, $add_provider_label=True) { * Cherche des valeurs d'une nomenclature répondant au pattern de recherche passé en paramètres * et retourne un tableau de celles-ci. * - * @param[in] $pattern string Le pattern de recherche - * @param[in] $max_matches int Nombre maximum de résultat retournés (optionnel, par défaut : 10) + * @param string $pattern Le pattern de recherche + * @param string $pattern Nombre maximum de résultat retournés (optionnel, par défaut : 10) * - * @retval array Tableau du résultat de la recherche + * @return array Tableau du résultat de la recherche **/ function supannSearchNomenclatureValueByPattern($table, $pattern, $max_matches=10) { $retval = array(); @@ -659,11 +659,11 @@ function supannSearchNomenclatureValueByPattern($table, $pattern, $max_matches=1 * get_possible_values de la configuration HTML de l'attribut * supannCivilite avec un type d'attribut HTML select_list (ou select_box). * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetCivilitePossibleValues($options, $name, $ldapObject) { @@ -677,11 +677,11 @@ function supannGetCivilitePossibleValues($options, $name, $ldapObject) { * get_possible_values de la configuration HTML de l'attribut * eduPersonAffiliation (par exemple) avec un type d'attribut HTML select_list. * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetAffiliationPossibleValues($options=null, $name=null, $ldapObject=null) { @@ -695,11 +695,11 @@ function supannGetAffiliationPossibleValues($options=null, $name=null, $ldapObje * get_possible_values de la configuration du composant ressource de l'attribut * supannRessourceEtat (entre autre) avec un type de composant select. * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetRessourcePossibleValues($options=null, $name=null, $ldapObject=null) { @@ -713,11 +713,11 @@ function supannGetRessourcePossibleValues($options=null, $name=null, $ldapObject * get_possible_values de la configuration du composant etat de l'attribut * supannRessourceEtat (entre autre) avec un type de composant select. * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetRessourceEtatPossibleValues($options=null, $name=null, $ldapObject=null) { @@ -731,11 +731,11 @@ function supannGetRessourceEtatPossibleValues($options=null, $name=null, $ldapOb * get_possible_values de la configuration du composant sous_etat de l'attribut * supannRessourceEtat (entre autre) avec un type de composant select. * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetRessourceSousEtatPossibleValues($options=null, $name=null, $ldapObject=null) { @@ -754,10 +754,10 @@ function supannGetRessourceSousEtatPossibleValues($options=null, $name=null, $ld * * @author Benjamin Dauvergne * - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * @author Benjamin Dauvergne * - * @retval boolean True si les valeurs sont valides, False sinon + * @return boolean True si les valeurs sont valides, False sinon **/ global $_supannCheckEduPersonAffiliation_checked; $_supannCheckEduPersonAffiliation_checked = false; @@ -784,9 +784,9 @@ function supannCheckEduPersonAffiliation(&$ldapObject) { * * @author Benjamin Dauvergne * - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval boolean True si la valeur est valide, False sinon + * @return boolean True si la valeur est valide, False sinon **/ function supannCheckEduPersonPrimaryAffiliation(&$ldapObject) { $primary = $ldapObject->getValue('eduPersonPrimaryAffiliation'); @@ -803,11 +803,11 @@ function supannCheckEduPersonPrimaryAffiliation(&$ldapObject) { * get_possible_values de la configuration HTML de l'attribut * supannOIDCGenre avec un type d'attribut HTML select_list ou select_box. * - * @param[in] $options La configuration HTML de l'attribut - * @param[in] $name Le nom de l'attribut - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param array $options La configuration HTML de l'attribut + * @param string $name Le nom de l'attribut + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval array Tableau contenant les valeurs possibles de l'attribut + * @return array Tableau contenant les valeurs possibles de l'attribut * (avec les labels traduits). **/ function supannGetOIDCGenrePossibleValues($options, $name, $ldapObject) { @@ -837,9 +837,9 @@ function supannDetectCodesPopulations($populations, $prefix="") { /* * Charge une nomenclature SUPANN * - * @param[in] $table string La nomenclature à charger + * @param string $pattern La nomenclature à charger * - * @retval boolean True si la nomenclature est chargée, False en cas de problème + * @return boolean True si la nomenclature est chargée, False en cas de problème */ $GLOBALS['_supann_loaded_nomenclatures'] = array(); function supannLoadNomenclature($table) { @@ -1007,9 +1007,9 @@ function supannLoadNomenclature($table) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array La valeur de l'attribut eduPersonOrgDN ou false + * @return array La valeur de l'attribut eduPersonOrgDN ou false * si il y a un problème durant la génération */ function generate_eduPersonPrincipalName($ldapObject) { @@ -1022,9 +1022,9 @@ function generate_eduPersonPrincipalName($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array La valeur de l'attribut eduPersonOrgDN ou false + * @return array La valeur de l'attribut eduPersonOrgDN ou false * si il y a un problème durant la génération */ function generate_eduPersonUniqueId($ldapObject) { @@ -1044,9 +1044,9 @@ function generate_eduPersonUniqueId($ldapObject) { * Note: Cette fonction peut également être utilisé pour le type d'objet * correspond aux établissements. * - * @param[in] &$ldapObject Une référence à l'object LSldapObject + * @param LSldapObject &$ldapObject Une référence à l'object LSldapObject * - * @retval boolean True si la valeur est valide, False sinon + * @return boolean True si la valeur est valide, False sinon **/ function supannCheckEntityCouldBeDeleted($ldapObject) { $children = $ldapObject -> listObjectsInRelation( @@ -1067,11 +1067,11 @@ function supannCheckEntityCouldBeDeleted($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap - * @param[in] $component Le composant associés à l'attribut à généré - * @param[in] $ignore_value Valeur possible du composant qui doit être ignoré (optionnel) + * @param LSldapObject $ldapObject L'objet ldap + * @param string $component Le composant associés à l'attribut à généré + * @param string $ignore_value Valeur possible du composant qui doit être ignoré (optionnel) * - * @retval array Les valeurs (uniques) du composant passé en paramètres trouvées dans les + * @return array Les valeurs (uniques) du composant passé en paramètres trouvées dans les * valeurs de l'attribut supannEtuInscription */ function generate_from_supannEtuInscription($ldapObject, $component, $ignore_value=null) { @@ -1108,9 +1108,9 @@ function generate_from_supannEtuInscription($ldapObject, $component, $ignore_val * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuDiplome + * @return array Les valeurs de l'attribut supannEtuDiplome */ function generate_supannEtuDiplome($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'diplome'); @@ -1122,9 +1122,9 @@ function generate_supannEtuDiplome($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuTypeDiplome + * @return array Les valeurs de l'attribut supannEtuTypeDiplome */ function generate_supannEtuTypeDiplome($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'typedip'); @@ -1136,9 +1136,9 @@ function generate_supannEtuTypeDiplome($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuRegimeInscription + * @return array Les valeurs de l'attribut supannEtuRegimeInscription */ function generate_supannEtuRegimeInscription($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'regimeinsc', '$'); @@ -1150,9 +1150,9 @@ function generate_supannEtuRegimeInscription($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuSecteurDisciplinaire + * @return array Les valeurs de l'attribut supannEtuSecteurDisciplinaire */ function generate_supannEtuSecteurDisciplinaire($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'sectdisc', '-'); @@ -1164,9 +1164,9 @@ function generate_supannEtuSecteurDisciplinaire($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuAnneeInscription + * @return array Les valeurs de l'attribut supannEtuAnneeInscription */ function generate_supannEtuAnneeInscription($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'anneeinsc'); @@ -1178,9 +1178,9 @@ function generate_supannEtuAnneeInscription($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuCursusAnnee + * @return array Les valeurs de l'attribut supannEtuCursusAnnee */ function generate_supannEtuCursusAnnee($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'cursusann'); @@ -1192,9 +1192,9 @@ function generate_supannEtuCursusAnnee($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuElementPedagogique + * @return array Les valeurs de l'attribut supannEtuElementPedagogique */ function generate_supannEtuElementPedagogique($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'eltpedago'); @@ -1206,9 +1206,9 @@ function generate_supannEtuElementPedagogique($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuEtape + * @return array Les valeurs de l'attribut supannEtuEtape */ function generate_supannEtuEtape($ldapObject) { return generate_from_supannEtuInscription($ldapObject, 'etape'); @@ -1220,9 +1220,9 @@ function generate_supannEtuEtape($ldapObject) { * * @author Benjamin Renard * - * @param[in] $ldapObject L'objet ldap + * @param LSldapObject $ldapObject L'objet ldap * - * @retval array Les valeurs de l'attribut supannEtuDateFin + * @return array Les valeurs de l'attribut supannEtuDateFin */ function generate_supannEtuDateFin($ldapObject) { $values = generate_from_supannEtuInscription($ldapObject, 'datefin'); diff --git a/src/includes/class/class.LSattr_html.php b/src/includes/class/class.LSattr_html.php index 4497da80..d41f0ca5 100644 --- a/src/includes/class/class.LSattr_html.php +++ b/src/includes/class/class.LSattr_html.php @@ -54,11 +54,11 @@ class LSattr_html extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $name string Nom de l'attribut ldap - * @param[in] $config array Configuration de l'objet - * @param[in] &$attribute LSattribute L'objet LSattribut parent + * @param string $name Nom de l'attribut ldap + * @param array $config Configuration de l'objet + * @param LSattribute &$attribute L'objet LSattribut parent * - * @retval boolean Retourne true. + * @return boolean Retourne true. */ public function __construct($name, $config, &$attribute) { $this -> name = $name; @@ -70,7 +70,7 @@ class LSattr_html extends LSlog_staticLoggerClass { /** * Allow conversion of LSattr_html to string * - * @retval string The string representation of the LSattr_html + * @return string The string representation of the LSattr_html */ public function __toString() { return "<".get_class($this)." ".$this -> name.">"; @@ -82,7 +82,7 @@ class LSattr_html extends LSlog_staticLoggerClass { * Retourne le label de l'attribut ou son nom si aucun label n'est défini * dans la configuration. * - * @retval string Le label de l'attribut. + * @return string Le label de l'attribut. */ public function getLabel() { return __($this -> getConfig('label', $this -> name)); @@ -91,11 +91,11 @@ class LSattr_html extends LSlog_staticLoggerClass { /** * Ajoute l'attribut au formualaire passer en paramètre * - * @param[in] &$form LSform Le formulaire - * @param[in] $idForm L'identifiant du formulaire - * @param[in] $data Valeur du champs du formulaire + * @param LSform &$form Le formulaire + * @param string $idForm L'identifiant du formulaire + * @param array|string|null $data Valeur du champs du formulaire * - * @retval LSformElement L'element du formulaire ajouté + * @return LSformElement L'element du formulaire ajouté */ public function addToForm (&$form,$idForm,$data=NULL) { if (!$this -> LSformElement_type) { @@ -123,9 +123,9 @@ class LSattr_html extends LSlog_staticLoggerClass { /** * Effectue les tâches nécéssaires au moment du rafraichissement du formulaire * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur formatée de l'attribut + * @return mixed La valeur formatée de l'attribut **/ public function refreshForm($data) { return $data; @@ -134,9 +134,9 @@ class LSattr_html extends LSlog_staticLoggerClass { /** * Return the values to be displayed in the LSform * - * @param[in] $data The values of attribute + * @param array $data The values of attribute * - * @retval array The values to be displayed in the LSform + * @return array The values to be displayed in the LSform **/ public function getFormVal($data) { return $this -> attribute -> getDisplayValue($data); @@ -149,7 +149,7 @@ class LSattr_html extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> config); diff --git a/src/includes/class/class.LSattr_html_date.php b/src/includes/class/class.LSattr_html_date.php index 2ad1efe0..d8bb9446 100644 --- a/src/includes/class/class.LSattr_html_date.php +++ b/src/includes/class/class.LSattr_html_date.php @@ -32,11 +32,11 @@ class LSattr_html_date extends LSattr_html { /** * Ajoute l'attribut au formualaire passer en paramètre * - * @param[in] &$form LSform Le formulaire - * @param[in] $idForm L'identifiant du formulaire - * @param[in] $data Valeur du champs du formulaire + * @param LSform &$form Le formulaire + * @param string $idForm L'identifiant du formulaire + * @param array|string|null $data Valeur du champs du formulaire * - * @retval LSformElement L'element du formulaire ajouté + * @return LSformElement L'element du formulaire ajouté */ function addToForm (&$form,$idForm,$data=NULL) { $element = parent::addToForm($form,$idForm,$data); diff --git a/src/includes/class/class.LSattr_html_sambaAcctFlags.php b/src/includes/class/class.LSattr_html_sambaAcctFlags.php index a257bdd9..cb7ddafd 100644 --- a/src/includes/class/class.LSattr_html_sambaAcctFlags.php +++ b/src/includes/class/class.LSattr_html_sambaAcctFlags.php @@ -32,13 +32,13 @@ class LSattr_html_sambaAcctFlags extends LSattr_html_select_box { /** * Retourne un tableau des valeurs possibles de la liste * - * @param[in] $options Attribute options (optional) - * @param[in] $name Attribute name (optional) - * @param[in] &$ldapObject Related LSldapObject (optional) + * @param array $options Attribute options (optional) + * @param string $name Attribute name (optional) + * @param LSldapObject &$ldapObject Related LSldapObject (optional) * * @author Benjamin Renard * - * @retval array Tableau associatif des valeurs possible de la liste avec en clé + * @return array Tableau associatif des valeurs possible de la liste avec en clé * la valeur des balises option et en valeur ce qui sera affiché. */ public static function _getPossibleValues($options=false, $name=false, &$ldapObject=false) { diff --git a/src/includes/class/class.LSattr_html_select_list.php b/src/includes/class/class.LSattr_html_select_list.php index f83fbbab..cb8767ee 100644 --- a/src/includes/class/class.LSattr_html_select_list.php +++ b/src/includes/class/class.LSattr_html_select_list.php @@ -47,11 +47,11 @@ class LSattr_html_select_list extends LSattr_html{ /** * Ajoute l'attribut au formualaire passer en paramètre * - * @param[in] &$form LSform Le formulaire - * @param[in] $idForm L'identifiant du formulaire - * @param[in] $data Valeur du champs du formulaire + * @param LSform &$form Le formulaire + * @param string $idForm L'identifiant du formulaire + * @param array|string|null $data Valeur du champs du formulaire * - * @retval LSformElement L'element du formulaire ajouté + * @return LSformElement L'element du formulaire ajouté */ public function addToForm (&$form,$idForm,$data=NULL) { $possible_values=$this -> getPossibleValues(); @@ -70,7 +70,7 @@ class LSattr_html_select_list extends LSattr_html{ * * @author Benjamin Renard * - * @retval array Associative array with possible values as key and corresponding + * @return array Associative array with possible values as key and corresponding * translated label as value. */ protected function getPossibleValues() { @@ -84,13 +84,13 @@ class LSattr_html_select_list extends LSattr_html{ /** * Return array of possible values with translated labels (if enabled) * - * @param[in] $options Attribute HTML options (optional) - * @param[in] $name Attribute name (optional) - * @param[in] &$ldapObject Related LSldapObject (optional) + * @param array $options Attribute HTML options (optional) + * @param string $name Attribute name (optional) + * @param LSldapObject &$ldapObject Related LSldapObject (optional) * * @author Benjamin Renard * - * @retval array Associative array with possible values as key and corresponding + * @return array Associative array with possible values as key and corresponding * translated label as value. */ public static function _getPossibleValues($options=false, $name=false, &$ldapObject=false) { @@ -152,7 +152,7 @@ class LSattr_html_select_list extends LSattr_html{ * As array_merge PHP function, this function merge arrays but * this method permit to preverve key even if it's numeric key. * - * @retval array Merged array + * @return array Merged array **/ protected static function _array_merge() { $ret=array(); @@ -167,10 +167,10 @@ class LSattr_html_select_list extends LSattr_html{ /** * Apply sort feature on possible values if this feature is enabled * - * @param[in] &$retInfos array Possible values array reference to sort - * @param[in] $options array|false Attribute HTML options + * @param array &$retInfos Possible values array reference to sort + * @param array|false $options Attribute HTML options * - * @retval void + * @return void **/ public static function _sort(&$retInfos, $options) { if (!isset($options['sort']) || $options['sort']) { @@ -186,10 +186,10 @@ class LSattr_html_select_list extends LSattr_html{ /** * Function use with uasort to sort two values in ASC order * - * @param[in] $va string One value - * @param[in] $vb string One value + * @param string $va One value + * @param string $va One value * - * @retval int Value for uasort + * @return int Value for uasort **/ protected static function _sortTwoValuesAsc(&$va,&$vb) { if (is_array($va)) { @@ -216,10 +216,10 @@ class LSattr_html_select_list extends LSattr_html{ /** * Function use with uasort to sort two values in DESC order * - * @param[in] $va string One value - * @param[in] $vb string One value + * @param string $va One value + * @param string $va One value * - * @retval int Value for uasort + * @return int Value for uasort **/ protected static function _sortTwoValuesDesc(&$va,&$vb) { return (-1 * static :: _sortTwoValuesAsc($va,$vb)); @@ -229,13 +229,13 @@ class LSattr_html_select_list extends LSattr_html{ /** * Retourne un tableau des valeurs possibles d'un type d'objet * - * @param[in] $conf OTHER_OBJECT configuration array - * @param[in] $options array|false Attribute HTML options - * @param[in] $name Attribute name + * @param array $conf OTHER_OBJECT configuration array + * @param array|false $options Attribute HTML options + * @param string $name Attribute name * * @author Benjamin Renard * - * @retval array Tableau associatif des valeurs possible de la liste avec en clé + * @return array Tableau associatif des valeurs possible de la liste avec en clé * la valeur des balises option et en valeur ce qui sera affiché. */ protected static function getLSobjectPossibleValues($conf, $options, $name) { @@ -299,14 +299,14 @@ class LSattr_html_select_list extends LSattr_html{ /** * Retourne un tableau des valeurs possibles d'un autre attribut * - * @param[in] $attr OTHER_ATTRIBUTE configuration value - * @param[in] $options array|false Attribute HTML options - * @param[in] $name Attribute name - * @param[in] $LSldapObject LSldapObject reference + * @param string|array $attr OTHER_ATTRIBUTE configuration value + * @param array|false $options Attribute HTML options + * @param string $name Attribute name + * @param LSform &$form reference * * @author Benjamin Renard * - * @retval array Tableau associatif des valeurs possible de la liste avec en clé + * @return array Tableau associatif des valeurs possible de la liste avec en clé * la valeur des balises option et en valeur ce qui sera affiché. */ protected static function getLSattributePossibleValues($attr, $options ,$name ,&$ldapObject) { @@ -381,13 +381,13 @@ class LSattr_html_select_list extends LSattr_html{ * Return array of possible values with translated labels (if enabled) * by using specify callable * - * @param[in] $options Attribute HTML options - * @param[in] $name Attribute name - * @param[in] &$ldapObject Related LSldapObject + * @param array $options Attribute HTML options + * @param string $name Attribute name + * @param LSldapObject &$ldapObject Related LSldapObject * * @author Benjamin Renard * - * @retval array|false Associative array with possible values as key and corresponding + * @return array|false Associative array with possible values as key and corresponding * translated label as value, or false in case of error. */ public static function getCallablePossibleValues($options, $name, &$ldapObject) { diff --git a/src/includes/class/class.LSattr_html_select_object.php b/src/includes/class/class.LSattr_html_select_object.php index 641686a2..fac10d73 100644 --- a/src/includes/class/class.LSattr_html_select_object.php +++ b/src/includes/class/class.LSattr_html_select_object.php @@ -33,11 +33,11 @@ class LSattr_html_select_object extends LSattr_html{ /** * Ajoute l'attribut au formualaire passer en paramètre * - * @param[in] &$form LSform Le formulaire - * @param[in] $idForm L'identifiant du formulaire - * @param[in] $data Valeur du champs du formulaire + * @param LSform &$form Le formulaire + * @param string $idForm L'identifiant du formulaire + * @param array|string|null $data Valeur du champs du formulaire * - * @retval LSformElement L'element du formulaire ajouté + * @return LSformElement L'element du formulaire ajouté */ public function addToForm (&$form,$idForm,$data=NULL) { $this -> config['attrObject'] = $this; @@ -61,9 +61,9 @@ class LSattr_html_select_object extends LSattr_html{ * Récupère un array du type array('DNs' => 'displayName') à partir d'une * liste de DNs. * - * @param[in] $data mixed La valeur de l'attribut (liste de DNs) + * @param mixed $data La valeur de l'attribut (liste de DNs) * - * @retval mixed La valeur formatée de l'attribut (array('DNs' => 'displayName')) + * @return mixed La valeur formatée de l'attribut (array('DNs' => 'displayName')) **/ public function refreshForm($data,$fromDNs=false) { return $this -> getFormValues($data,$fromDNs); @@ -73,13 +73,13 @@ class LSattr_html_select_object extends LSattr_html{ * Check and return selectable objects configuration and eventually instanciate * it if &instanciate * - * @param[in] boolean &$instanciated_objects reference If this reference point to an array, each valid + * @param boolean &$instanciated_objects reference If this reference point to an array, each valid * selectable object type will be instanciated in this * array with object type name as key. * * @author Benjamin Renard * - * @retval array|false Selectable objects configuration or False on error. + * @return array|false Selectable objects configuration or False on error. */ public function getSelectableObjectsConfig(&$instanciated_objects) { $confs = $this -> getConfig('html_options.selectable_object'); @@ -166,14 +166,14 @@ class LSattr_html_select_object extends LSattr_html{ * Return an array of selected objects with DN as key and as value, an array with object name (key name) * and type (key object_type). * - * @param[in] mixed $values array|null Array of the input values () - * @param[in] boolean $fromDNs boolean If true, considered provided values as DNs (default: false) - * @param[in] boolean $retrieveAttrValues boolean If true, attribute values will be returned instead + * @param mixed $values array|null Array of the input values () + * @param boolean $fromDNs boolean If true, considered provided values as DNs (default: false) + * @param boolean $retrieveAttrValues boolean If true, attribute values will be returned instead * of selected objects info (default: false) * * @author Benjamin Renard * - * @retval array|false Array of selected objects with DN as key and object info as value or array + * @return array|false Array of selected objects with DN as key and object info as value or array * of attribute values if $retrieveAttrValues==true or False on error. */ public function getFormValues($values=NULL, $fromDNs=false, $retrieveAttrValues=false) { @@ -343,11 +343,11 @@ class LSattr_html_select_object extends LSattr_html{ /** * Return array of atttribute values form array of form values * - * @param[in] mixed Array of form values + * @param mixed $values Array of form values * * @author Benjamin Renard * - * @retval array|false Array of attribute values or False on error. + * @return array|false Array of attribute values or False on error. */ public function getValuesFromFormValues($values=NULL) { if (is_array($values)) { @@ -362,7 +362,7 @@ class LSattr_html_select_object extends LSattr_html{ * * @author Benjamin Renard * - * @retval array Tableau associatif des objects selectionnés avec en clé + * @return array Tableau associatif des objects selectionnés avec en clé * le DN et en valeur ce qui sera affiché. */ public function getValuesFromLSselect() { @@ -383,9 +383,9 @@ class LSattr_html_select_object extends LSattr_html{ /** * Return the values to be displayed in the LSform * - * @param[in] $data The values of attribute + * @param array $data The values of attribute * - * @retval array The values to be displayed in the LSform + * @return array The values to be displayed in the LSform **/ public function getFormVal($data) { return $data; diff --git a/src/includes/class/class.LSattr_ldap.php b/src/includes/class/class.LSattr_ldap.php index 06d727d3..d9f6c8d6 100644 --- a/src/includes/class/class.LSattr_ldap.php +++ b/src/includes/class/class.LSattr_ldap.php @@ -40,11 +40,11 @@ class LSattr_ldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $name string Nom de l'attribut ldap - * @param[in] $config array Configuration de l'objet - * @param[in] &$attribute LSattribute L'objet LSattribut parent + * @param string $name Nom de l'attribut ldap + * @param array $config Configuration de l'objet + * @param LSattribute &$attribute L'objet LSattribut parent * - * @retval boolean Retourne true. + * @return boolean Retourne true. */ public function __construct($name, $config, &$attribute) { $this -> name = $name; @@ -56,7 +56,7 @@ class LSattr_ldap extends LSlog_staticLoggerClass { /** * Allow conversion of LSattr_ldap to string * - * @retval string The string representation of the LSattr_ldap + * @return string The string representation of the LSattr_ldap */ public function __toString() { return "<".get_class($this)." ".$this -> name.">"; @@ -65,9 +65,9 @@ class LSattr_ldap extends LSlog_staticLoggerClass { /** * Retourne la valeur de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur traitée de l'attribut + * @return mixed La valeur traitée de l'attribut */ public function getUpdateData($data) { return ensureIsArray($data); @@ -76,9 +76,9 @@ class LSattr_ldap extends LSlog_staticLoggerClass { /** * Retourne la valeur d'affichage de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur d'affichage de l'attribut + * @return mixed La valeur d'affichage de l'attribut */ public function getDisplayValue($data) { return ensureIsArray($data); @@ -88,9 +88,9 @@ class LSattr_ldap extends LSlog_staticLoggerClass { * Retourne vrai si la valeur passé en paramètre n'était pas la même que la * valeur passer au formulaire * - * @param[in] $data mixed La valeur a tester + * @param mixed $data La valeur a tester * - * @retval boolean True uniquement si la valeur passer en paramètre différe de l'actuelle + * @return boolean True uniquement si la valeur passer en paramètre différe de l'actuelle */ public function isUpdated($data) { $data = $this -> getUpdateData($data); @@ -107,7 +107,7 @@ class LSattr_ldap extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> config); diff --git a/src/includes/class/class.LSattr_ldap_boolean.php b/src/includes/class/class.LSattr_ldap_boolean.php index a1c90f77..ee5736fc 100644 --- a/src/includes/class/class.LSattr_ldap_boolean.php +++ b/src/includes/class/class.LSattr_ldap_boolean.php @@ -28,9 +28,9 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Return display value of attribute after treatment related to LDAP type * - * @param[in] $data mixed Attribute data + * @param mixed $data Attribute data * - * @retval mixed Attribute display value + * @return mixed Attribute display value **/ public function getDisplayValue($data) { if ($this -> isTrue($data)) @@ -43,9 +43,9 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Return attribute value after treatment related to LDAP type * - * @param[in] $data mixed Attribute data + * @param mixed $data Attribute data * - * @retval mixed Attribute data + * @return mixed Attribute data **/ public function getUpdateData($data) { $data = ensureIsArray($data); @@ -63,9 +63,9 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Check if a value corresponding to True * - * @param[in] $data Attribute data + * @param array|string|null $data Attribute data * - * @retval boolean True or False + * @return boolean True or False **/ public function isTrue($data) { $data = ensureIsArray($data); @@ -78,9 +78,9 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Check if a value corresponding to False * - * @param[in] $data Attribute data + * @param array|string|null $data Attribute data * - * @retval boolean True or False + * @return boolean True or False **/ public function isFalse($data) { $data = ensureIsArray($data); @@ -93,7 +93,7 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Return True value * - * @retval string The True value + * @return string The True value **/ public function getTrue() { return $this -> getConfig('ldap_options.true_value', 'TRUE', 'string'); @@ -102,7 +102,7 @@ class LSattr_ldap_boolean extends LSattr_ldap { /** * Return False value * - * @retval string The False value + * @return string The False value **/ public function getFalse() { return $this -> getConfig('ldap_options.false_value', 'FALSE', 'string'); diff --git a/src/includes/class/class.LSattr_ldap_compositeValueToJSON.php b/src/includes/class/class.LSattr_ldap_compositeValueToJSON.php index 6626bc7f..91b40888 100644 --- a/src/includes/class/class.LSattr_ldap_compositeValueToJSON.php +++ b/src/includes/class/class.LSattr_ldap_compositeValueToJSON.php @@ -32,9 +32,9 @@ class LSattr_ldap_compositeValueToJSON extends LSattr_ldap { /** * Retourne la valeur d'affichage de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur d'affichage de l'attribut + * @return mixed La valeur d'affichage de l'attribut */ public function getDisplayValue($data) { $ret = array(); @@ -46,9 +46,9 @@ class LSattr_ldap_compositeValueToJSON extends LSattr_ldap { /** * Retourne la valeur de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur traitée de l'attribut + * @return mixed La valeur traitée de l'attribut */ public function getUpdateData($data) { $ret = array(); diff --git a/src/includes/class/class.LSattr_ldap_date.php b/src/includes/class/class.LSattr_ldap_date.php index d372da76..b530d7d4 100644 --- a/src/includes/class/class.LSattr_ldap_date.php +++ b/src/includes/class/class.LSattr_ldap_date.php @@ -29,9 +29,9 @@ class LSattr_ldap_date extends LSattr_ldap { /** * Retourne la valeur d'affichage de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur d'affichage de l'attribut + * @return mixed La valeur d'affichage de l'attribut */ public function getDisplayValue($data) { $data = ensureIsArray($data); @@ -51,9 +51,9 @@ class LSattr_ldap_date extends LSattr_ldap { /** * Retourne la valeur de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur traitée de l'attribut + * @return mixed La valeur traitée de l'attribut */ public function getUpdateData($data) { $data = ensureIsArray($data); @@ -78,7 +78,7 @@ class LSattr_ldap_date extends LSattr_ldap { /** * Retourne le format de stockage de la date * - * @retval string Le format de la date + * @return string Le format de la date **/ public function getFormat() { return $this -> getConfig('ldap_options.format', 'YmdHisO'); diff --git a/src/includes/class/class.LSattr_ldap_naiveDate.php b/src/includes/class/class.LSattr_ldap_naiveDate.php index e31cb874..dee119cc 100644 --- a/src/includes/class/class.LSattr_ldap_naiveDate.php +++ b/src/includes/class/class.LSattr_ldap_naiveDate.php @@ -31,9 +31,9 @@ class LSattr_ldap_naiveDate extends LSattr_ldap { /** * Return the display value of the attribute after handling is LDAP type * - * @param[in] $data mixed The LDAP attribute value + * @param mixed $data The LDAP attribute value * - * @retval mixed The display value ot the attribute + * @return mixed The display value ot the attribute */ public function getDisplayValue($data) { $retval = array(); @@ -56,9 +56,9 @@ class LSattr_ldap_naiveDate extends LSattr_ldap { /** * Return the value of the LDAP attribute after handling is LDAP type * - * @param[in] $data mixed The value of the attribute + * @param mixed $data The value of the attribute * - * @retval mixed The LDAP value of the attribute + * @return mixed The LDAP value of the attribute */ public function getUpdateData($data) { $retval = array(); @@ -72,7 +72,7 @@ class LSattr_ldap_naiveDate extends LSattr_ldap { /** * Return the storage format of the date (as accept by strptime()/strftime()) * - * @retval string the storage format of the date + * @return string the storage format of the date **/ public function getFormat() { return $this -> getConfig('ldap_options.format', "%Y%m%d%H%M%SZ"); diff --git a/src/includes/class/class.LSattr_ldap_password.php b/src/includes/class/class.LSattr_ldap_password.php index 2e36faa7..898e33d8 100644 --- a/src/includes/class/class.LSattr_ldap_password.php +++ b/src/includes/class/class.LSattr_ldap_password.php @@ -31,9 +31,9 @@ class LSattr_ldap_password extends LSattr_ldap { /** * Return the display value of this attribute * - * @param[in] $data mixed The value of this attribute + * @param mixed $data The value of this attribute * - * @retval mixed The display value of this attribute + * @return mixed The display value of this attribute */ public function getDisplayValue($data) { if ($this -> getConfig('ldap_options.displayClearValue', false, 'bool')) { @@ -56,9 +56,9 @@ class LSattr_ldap_password extends LSattr_ldap { * Note : Password encoding was strongly inspired of the project phpLdapAdmin. * URL : http://phpldapadmin.sourceforge.net/ * - * @param[in] $data mixed The attribute value + * @param mixed $data The attribute value * - * @retval mixed The value of this attribute to be stocked + * @return mixed The value of this attribute to be stocked */ public function getUpdateData($data) { $ret = array(); @@ -84,9 +84,9 @@ class LSattr_ldap_password extends LSattr_ldap { * Note : Password encoding was strongly inspired of the project phpLdapAdmin. * URL : http://phpldapadmin.sourceforge.net/ * - * @param[in] $clearPassword string The clear password + * @param mixed $data The clear password * - * @retval strinf The encode password + * @return strinf The encode password */ public function encodePassword($clearPassword, $encode=null, $encode_function=null, $salt=null) { if (is_null($encode)) @@ -343,9 +343,9 @@ class LSattr_ldap_password extends LSattr_ldap { /** * Return salt (random string) * - * @param[in] integer Number of caracters in this salt + * @param integer $length Number of caracters in this salt * - * @retval string A salt + * @return string A salt */ public static function getSalt($length=8) { $pattern = "1234567890abcdefghijklmnopqrstuvwxyz"; @@ -360,7 +360,7 @@ class LSattr_ldap_password extends LSattr_ldap { /** * Return the password in clear text * - * @retval string The password in clear text + * @return string The password in clear text */ public function getClearPassword() { return $this -> clearPassword; diff --git a/src/includes/class/class.LSattr_ldap_postaladdress.php b/src/includes/class/class.LSattr_ldap_postaladdress.php index 813b96ca..f3971677 100644 --- a/src/includes/class/class.LSattr_ldap_postaladdress.php +++ b/src/includes/class/class.LSattr_ldap_postaladdress.php @@ -29,9 +29,9 @@ class LSattr_ldap_postaladdress extends LSattr_ldap { /** * Retourne la valeur d'affichage de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur d'affichage de l'attribut + * @return mixed La valeur d'affichage de l'attribut */ public function getDisplayValue($data) { $ret = array(); @@ -43,9 +43,9 @@ class LSattr_ldap_postaladdress extends LSattr_ldap { /** * Retourne la valeur de l'attribut après traitement lié à son type ldap * - * @param[in] $data mixed La valeur de l'attribut + * @param mixed $data La valeur de l'attribut * - * @retval mixed La valeur traitée de l'attribut + * @return mixed La valeur traitée de l'attribut */ public function getUpdateData($data) { $ret = array(); diff --git a/src/includes/class/class.LSattr_ldap_pwdHistory.php b/src/includes/class/class.LSattr_ldap_pwdHistory.php index a9376427..8ffac9ee 100644 --- a/src/includes/class/class.LSattr_ldap_pwdHistory.php +++ b/src/includes/class/class.LSattr_ldap_pwdHistory.php @@ -36,9 +36,9 @@ class LSattr_ldap_pwdHistory extends LSattr_ldap { /** * Return the values as JSON encoded string * - * @param[in] $data mixed LDAP attribute value + * @param mixed $data LDAP attribute value * - * @retval mixed Array of JSON encoded string + * @return mixed Array of JSON encoded string */ public function getDisplayValue($data) { $ret = array(); @@ -50,9 +50,9 @@ class LSattr_ldap_pwdHistory extends LSattr_ldap { /** * Return the values for saving * - * @param[in] $data mixed Array of timestamp + * @param mixed $data Array of timestamp * - * @retval mixed LDAP attribute values + * @return mixed LDAP attribute values */ public function getUpdateData($data) { $ret = array(); @@ -111,7 +111,7 @@ class LSattr_ldap_pwdHistory extends LSattr_ldap { /** * Return date format * - * @retval string The date format (as accept by Datetime :: format() and date_create_from_format()) + * @return string The date format (as accept by Datetime :: format() and date_create_from_format()) **/ public function getFormat() { return $this -> getConfig('ldap_options.date_format', 'Y/m/d H:i:s'); diff --git a/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php b/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php index 01324c77..fc4556d5 100644 --- a/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php +++ b/src/includes/class/class.LSattr_ldap_sambaAcctFlags.php @@ -28,9 +28,9 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { /** * Return display value of attribute after treatment related to LDAP type * - * @param[in] $data mixed Attribute data + * @param mixed $data Attribute data * - * @retval mixed Attribute display value + * @return mixed Attribute display value **/ public function getDisplayValue($data) { $values = self :: parse_flags($data); @@ -42,9 +42,9 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { /** * Return attribute value after treatment related to LDAP type * - * @param[in] $data mixed Attribute data + * @param mixed $data Attribute data * - * @retval mixed Attribute data + * @return mixed Attribute data **/ public function getUpdateData($data) { $values = self :: format_flags($data); @@ -56,9 +56,9 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { /** * Parse flags * - * @param[in] $data Attribute data + * @param array|string|null $data Attribute data * - * @retval array Array of enabled flags + * @return array Array of enabled flags **/ public static function parse_flags($data) { if (!$data) @@ -94,9 +94,9 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { /** * Format flags as one LDAP attribute value * - * @param[in] $flags array of string Flags + * @param array $flags of string Flags * - * @retval array Array of LDAP attribute value + * @return array Array of LDAP attribute value **/ public static function format_flags($flags) { $flags = ensureIsArray($flags); @@ -117,9 +117,9 @@ class LSattr_ldap_sambaAcctFlags extends LSattr_ldap { /** * Check if a flag is valid * - * @param[in] $flag string The flag + * @param string $flag The flag * - * @retval boolean True if flag is valid, False otherwise + * @return boolean True if flag is valid, False otherwise **/ public static function check_flag($flag) { foreach(self :: get_available_flags() as $group_label => $flags) diff --git a/src/includes/class/class.LSattr_ldap_shadowExpire.php b/src/includes/class/class.LSattr_ldap_shadowExpire.php index 6f91c345..be2a7e2a 100644 --- a/src/includes/class/class.LSattr_ldap_shadowExpire.php +++ b/src/includes/class/class.LSattr_ldap_shadowExpire.php @@ -31,9 +31,9 @@ class LSattr_ldap_shadowExpire extends LSattr_ldap { /** * Return the values as timestamps * - * @param[in] $data mixed LDAP attribute value + * @param mixed $data LDAP attribute value * - * @retval mixed Array of timestamp + * @return mixed Array of timestamp */ public function getDisplayValue($data) { $ret = array(); @@ -45,9 +45,9 @@ class LSattr_ldap_shadowExpire extends LSattr_ldap { /** * Return the values for saving * - * @param[in] $data mixed Array of timestamp + * @param mixed $data Array of timestamp * - * @retval mixed LDAP attribute values + * @return mixed LDAP attribute values */ public function getUpdateData($data) { $ret=array(); diff --git a/src/includes/class/class.LSattribute.php b/src/includes/class/class.LSattribute.php index cb2ddd3e..536aab58 100644 --- a/src/includes/class/class.LSattribute.php +++ b/src/includes/class/class.LSattribute.php @@ -55,11 +55,11 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $name string Nom de l'attribut ldap - * @param[in] $config array Configuration de l'objet - * @param[in] &$ldapObject LSldapObject L'objet ldap parent + * @param string $name Nom de l'attribut ldap + * @param string $name Configuration de l'objet + * @param LSldapObject &$ldapObject L'objet ldap parent * - * @retval boolean Retourne true si la création a réussi, false sinon. + * @return boolean Retourne true si la création a réussi, false sinon. */ public function __construct($name, $config, &$ldapObject) { $this -> name = $name; @@ -88,7 +88,7 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Allow conversion of LSattribute to string * - * @retval string The string representation of the LSattribute + * @return string The string representation of the LSattribute */ public function __toString() { return strval($this -> ldapObject)." -> name.">"; @@ -99,7 +99,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval string Le label de l'attribut + * @return string Le label de l'attribut * * @see LSattr_html::getLabel() */ @@ -117,7 +117,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true + * @return boolean true */ public function loadData($attr_data) { $this -> data = ensureIsArray($attr_data); @@ -129,7 +129,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true + * @return boolean true */ public function reloadData($attr_data) { $this -> data = ensureIsArray($attr_data); @@ -145,7 +145,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval mixed La valeur de l'attribut + * @return mixed La valeur de l'attribut */ public function getValue() { if ($this -> isUpdate()) { @@ -161,7 +161,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval mixed La valeur originale de l'attribut + * @return mixed La valeur originale de l'attribut */ public function getOldValue() { return $this -> data; @@ -170,11 +170,11 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Return attribute's display value * - * @param[in] $data mixed Custom attribute data (optional, default: current attribute data) + * @param string $name Custom attribute data (optional, default: current attribute data) * * @author Benjamin Renard * - * @retval mixed The display value of the attribute + * @return mixed The display value of the attribute */ public function getDisplayValue($data=false) { if (!$this -> ldap) { @@ -217,12 +217,12 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] object $form Le formulaire dans lequel doit être ajouté l'attribut - * @param[in] string $idForm L'identifiant du formulaire - * @param[in] objet &$obj Objet utilisable pour la génération de la valeur de l'attribut - * @param[in] array $value valeur de l'élement + * @param object $form Le formulaire dans lequel doit être ajouté l'attribut + * @param string $idForm L'identifiant du formulaire + * @param object &$obj Objet utilisable pour la génération de la valeur de l'attribut + * @param string $idForm valeur de l'élement * - * @retval boolean true si l'ajout a fonctionner ou qu'il n'est pas nécessaire, false sinon + * @return boolean true si l'ajout a fonctionner ou qu'il n'est pas nécessaire, false sinon */ public function addToForm(&$form,$idForm,&$obj=NULL,$value=NULL) { $form_mode = $this -> getConfig("form.$idForm", false); @@ -277,7 +277,7 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Récupération des droits de l'utilisateur sur l'attribut * - * @retval string 'r'/'w'/'n' pour 'read'/'write'/'none' + * @return string 'r'/'w'/'n' pour 'read'/'write'/'none' **/ private function myRights() { // cache @@ -313,11 +313,11 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $form LSform The LSform object - * @param[in] $api_mode boolean True if it's a view in API mode (=all accessible attributes present, + * @param LSldapObject &$ldapObject The LSform object + * @param boolean $api_mode True if it's a view in API mode (=all accessible attributes present, * optional, default: false) * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ public function addToView(&$form, $api_mode=false) { if ((!$api_mode && !$this -> getConfig('view', false, 'bool')) || ($this -> myRights() == 'n') ) @@ -335,9 +335,9 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $form LSform The LSform object + * @param LSldapObject &$ldapObject The LSform object * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ public function addToExport(&$form) { if ($this -> myRights() == 'n') @@ -355,9 +355,9 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] object $form The LSform object + * @param object $form The LSform object * - * @retval LSformElement|False LSformElement object on success, False otherwise + * @return LSformElement|False LSformElement object on success, False otherwise */ private function _addToForm(&$form, $idForm, &$obj=NULL, $data=NULL) { if (!$this -> html) { @@ -387,10 +387,10 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] object &$form LSform Le formulaire dans lequel doit être ajouté l'attribut - * @param[in] string $idForm L'identifiant du formulaire + * @param object $form LSform Le formulaire dans lequel doit être ajouté l'attribut + * @param string $idForm L'identifiant du formulaire * - * @retval boolean true si la valeur a été rafraichie ou que ce n'est pas nécessaire, false sinon + * @return boolean true si la valeur a été rafraichie ou que ce n'est pas nécessaire, false sinon */ public function refreshForm(&$form,$idForm) { if ($this -> getConfig("form.$idForm") && ($this -> myRights() != 'n')) { @@ -413,11 +413,11 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Return the form display value * - * @param[in] $data mixed Custom attribute data (optional, default: current attribute data) + * @param string $name Custom attribute data (optional, default: current attribute data) * * @author Benjamin Renard * - * @retval string The form display value + * @return string The form display value */ public function getFormVal($data=null) { if (is_null($data)) { @@ -431,9 +431,9 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] string $data Les données de mise à jour. + * @param string $idForm Les données de mise à jour. * - * @retval void + * @return void */ public function setUpdateData($data) { if($this -> ldap -> isUpdated($data)) { @@ -446,7 +446,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si l'attribut a été validé, false sinon + * @return boolean true si l'attribut a été validé, false sinon */ public function isValidate() { return $this -> is_validate; @@ -457,7 +457,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval void + * @return void */ public function validate() { $this -> is_validate=true; @@ -468,7 +468,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si l'attribut a été mis à jour, false sinon + * @return boolean true si l'attribut a été mis à jour, false sinon */ public function isUpdate() { return ($this -> updateData===false)?false:true; @@ -479,7 +479,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si l'attribut est obligatoire, false sinon + * @return boolean true si l'attribut est obligatoire, false sinon */ public function isRequired() { return $this -> getConfig('required', false, 'bool'); @@ -490,7 +490,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si la valeur de l'attribut peut être générée, false sinon + * @return boolean true si la valeur de l'attribut peut être générée, false sinon */ public function canBeGenerated() { $format = $this -> getConfig('generate_value_format', $this -> getConfig('default_value')); @@ -507,7 +507,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si la valeur à put être générée, false sinon + * @return boolean true si la valeur à put être générée, false sinon */ public function generateValue() { $value = $this -> getConfig('default_value', false); @@ -533,7 +533,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval mixed La valeur de l'attribut pour son enregistrement dans l'annuaire + * @return mixed La valeur de l'attribut pour son enregistrement dans l'annuaire */ public function getUpdateData() { if (!$this -> isUpdate()) { @@ -584,7 +584,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval mixed La configuration de validation de l'attribut + * @return mixed La configuration de validation de l'attribut */ public function getValidateConfig() { if (isset($this -> config['validation'])) { @@ -598,7 +598,7 @@ class LSattribute extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval array les noms des attributs dépendants + * @return array les noms des attributs dépendants */ public function getDependsAttrs() { return (isset($this -> config['dependAttrs'])?$this -> config['dependAttrs']:null); @@ -607,12 +607,12 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Ajouter une action lors d'un événement * - * @param[in] $event string Le nom de l'événement - * @param[in] $fct string Le nom de la fonction à exectuer - * @param[in] $params mixed Paramètres pour le lancement de la fonction - * @param[in] $class Nom de la classe possèdant la méthode $fct à executer + * @param string $name Le nom de l'événement + * @param string $name Le nom de la fonction à exectuer + * @param string $name Paramètres pour le lancement de la fonction + * @param string $class Nom de la classe possèdant la méthode $fct à executer * - * @retval void + * @return void */ public function addEvent($event,$fct,$params,$class=NULL) { $this -> _events[$event][] = array( @@ -625,12 +625,12 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Ajouter une action sur un objet lors d'un événement * - * @param[in] $event string Le nom de l'événement - * @param[in] $obj object L'objet dont la méthode doit être executé - * @param[in] $meth string Le nom de la méthode - * @param[in] $params mixed Paramètres d'execution de la méthode + * @param string $name Le nom de l'événement + * @param object $obj L'objet dont la méthode doit être executé + * @param string $name Le nom de la méthode + * @param string $name Paramètres d'execution de la méthode * - * @retval void + * @return void */ public function addObjectEvent($event,&$obj,$meth,$params=NULL) { $this -> _objectEvents[$event][] = array( @@ -643,9 +643,9 @@ class LSattribute extends LSlog_staticLoggerClass { /** * Lance les actions à executer lors d'un événement * - * @param[in] $event string Le nom de l'événement + * @param string $name Le nom de l'événement * - * @retval boolean True si tout c'est bien passé, false sinon + * @return boolean True si tout c'est bien passé, false sinon */ public function fireEvent($event) { self :: log_debug(strval($this)." -> fireEvent($event)"); @@ -740,7 +740,7 @@ class LSattribute extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> config); diff --git a/src/includes/class/class.LSauth.php b/src/includes/class/class.LSauth.php index 376d36ae..62c1c83d 100644 --- a/src/includes/class/class.LSauth.php +++ b/src/includes/class/class.LSauth.php @@ -102,7 +102,7 @@ class LSauth extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ private static function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, self :: $config); @@ -142,7 +142,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Check if the specified auth object type have acces to LdapSaisie (on the current mode) * - * @param[in] $objType string The LSobject type + * @param string $objType The LSobject type * * @return boolean True if specified auth object type have acces to LdapSaisie, False otherwise */ @@ -157,7 +157,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Retrieved LSobjects corresponding to a username * - * @retval array|false Array of corresponding LSldapObject with object DN as key, or false in case of error + * @return array|false Array of corresponding LSldapObject with object DN as key, or false in case of error */ public static function username2LSobjects($username) { $user_objects = array(); @@ -198,9 +198,9 @@ class LSauth extends LSlog_staticLoggerClass { /** * Get user password attribute name * - * @param[in] &object LSldapObject The user object + * @param LSldapObject &object The user object * - * @retval string|false The user password attribute name or false if not configured + * @return string|false The user password attribute name or false if not configured */ public static function getUserPasswordAttribute(&$object) { $authObjectTypes = self :: getAuthObjectTypes(); @@ -217,7 +217,7 @@ class LSauth extends LSlog_staticLoggerClass { * * @params[in] $user The LSldapObject of the user authificated * - * @retval Array|false Array of LDAP credentials array('dn','pwd') or False + * @return array|false Array of LDAP credentials array('dn','pwd') or False **/ public static function getLDAPcredentials($user) { return self :: $provider -> getLDAPcredentials($user); @@ -226,7 +226,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Logout * - * @retval void + * @return void **/ public static function logout() { if (!is_null(self :: $provider)) { @@ -242,7 +242,7 @@ class LSauth extends LSlog_staticLoggerClass { * This method is run by LSsession after the local session was * was successfully destroyed. * - * @retval void + * @return void **/ public static function afterLogout() { if (!is_null(self :: $provider)) { @@ -255,7 +255,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Disable logout button in LSauth parameters * - * @retval void + * @return void **/ public static function disableLogoutBtn() { self :: $params['displayLogoutBtn'] = false; @@ -264,7 +264,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Can display or not logout button in LSauth parameters * - * @retval boolean + * @return boolean **/ public static function displayLogoutBtn() { return self :: $params['displayLogoutBtn']; @@ -273,7 +273,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Disable self access * - * @retval void + * @return void **/ public static function disableSelfAccess() { self :: $params['displaySelfAccess'] = false; @@ -282,7 +282,7 @@ class LSauth extends LSlog_staticLoggerClass { /** * Can display or not self access * - * @retval boolean + * @return boolean **/ public static function displaySelfAccess() { return self :: $params['displaySelfAccess']; diff --git a/src/includes/class/class.LSauthMethod.php b/src/includes/class/class.LSauthMethod.php index 03dcb4a0..9c127105 100644 --- a/src/includes/class/class.LSauthMethod.php +++ b/src/includes/class/class.LSauthMethod.php @@ -48,7 +48,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { * * Return authentication data or false * - * @retval Array|false Array of authentication data or False + * @return array|false Array of authentication data or False **/ public function getAuthData() { // Do nothing in the standard LSauthMethod class @@ -59,7 +59,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { /** * Check authentication * - * @retval LSldapObject|false The LSldapObject of the user authificated or false + * @return LSldapObject|false The LSldapObject of the user authificated or false */ public function authenticate() { $authobjects = LSauth :: username2LSobjects($this -> authData['username']); @@ -82,7 +82,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { /** * Logout * - * @retval boolean True on success or False + * @return boolean True on success or False **/ public function logout() { // Do nothing in the standard LSauthMethod class @@ -95,7 +95,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { * This method is run by LSsession after the local session was * was successfully destroyed. * - * @retval void + * @return void **/ public static function afterLogout() { return true; @@ -108,7 +108,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { * * @params[in] $user The LSldapObject of the user authificated * - * @retval Array|false Array of LDAP credentials array('dn','pwd') or False + * @return array|false Array of LDAP credentials array('dn','pwd') or False **/ public function getLDAPcredentials($user) { if (isset($this -> authData['password'])) { @@ -123,7 +123,7 @@ class LSauthMethod extends LSlog_staticLoggerClass { /** * Check API mode support of this method * - * @retval boolean True if API mode is support, false otherwise + * @return boolean True if API mode is support, false otherwise */ static public function apiModeSupported() { return static :: $api_mode_supported; diff --git a/src/includes/class/class.LSauthMethod_CAS.php b/src/includes/class/class.LSauthMethod_CAS.php index 32bb080a..d77e7cc3 100644 --- a/src/includes/class/class.LSauthMethod_CAS.php +++ b/src/includes/class/class.LSauthMethod_CAS.php @@ -92,7 +92,7 @@ class LSauthMethod_CAS extends LSauthMethod { * * Return authentication data or false * - * @retval Array|false Array of authentication data or False + * @return array|false Array of authentication data or False **/ public function getAuthData() { if ($this -> configured) { @@ -112,7 +112,7 @@ class LSauthMethod_CAS extends LSauthMethod { /** * Logout * - * @retval boolean True on success or False + * @return boolean True on success or False **/ public function logout() { if($this -> configured) { diff --git a/src/includes/class/class.LSauthMethod_HTTP.php b/src/includes/class/class.LSauthMethod_HTTP.php index ba0215c1..1a2d1366 100644 --- a/src/includes/class/class.LSauthMethod_HTTP.php +++ b/src/includes/class/class.LSauthMethod_HTTP.php @@ -44,7 +44,7 @@ class LSauthMethod_HTTP extends LSauthMethod_basic { * * Return authentication data or false * - * @retval Array|false Array of authentication data or False + * @return array|false Array of authentication data or False **/ public function getAuthData() { if (!defined('LSAUTHMETHOD_HTTP_METHOD')) { @@ -110,7 +110,7 @@ class LSauthMethod_HTTP extends LSauthMethod_basic { /** * Check authentication * - * @retval LSldapObject|false The LSldapObject of the user authificated or false + * @return LSldapObject|false The LSldapObject of the user authificated or false */ public function authenticate() { if ( (defined('LSAUTHMETHOD_HTTP_TRUST_WITHOUT_PASSWORD_CHALLENGE')) && (constant('LSAUTHMETHOD_HTTP_TRUST_WITHOUT_PASSWORD_CHALLENGE') === True)) { @@ -129,7 +129,7 @@ class LSauthMethod_HTTP extends LSauthMethod_basic { * This method is run by LSsession after the local session was * was successfully destroyed. * - * @retval void + * @return void **/ public static function afterLogout() { if (defined('LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL')) { diff --git a/src/includes/class/class.LSauthMethod_anonymous.php b/src/includes/class/class.LSauthMethod_anonymous.php index 48ef6bdb..b08ecfed 100644 --- a/src/includes/class/class.LSauthMethod_anonymous.php +++ b/src/includes/class/class.LSauthMethod_anonymous.php @@ -52,7 +52,7 @@ class LSauthMethod_anonymous extends LSauthMethod { * * Return authentication data or false * - * @retval Array|false Array of authentication data or False + * @return array|false Array of authentication data or False **/ public function getAuthData() { $this -> authData = array( diff --git a/src/includes/class/class.LSauthMethod_basic.php b/src/includes/class/class.LSauthMethod_basic.php index 7a9e401c..6f00bf0c 100644 --- a/src/includes/class/class.LSauthMethod_basic.php +++ b/src/includes/class/class.LSauthMethod_basic.php @@ -32,7 +32,7 @@ class LSauthMethod_basic extends LSauthMethod { * * Return authentication data or false * - * @retval Array|false Array of authentication data or False + * @return array|false Array of authentication data or False **/ public function getAuthData() { if (isset($_POST['LSauth_user']) && !empty($_POST['LSauth_user'])) { @@ -48,7 +48,7 @@ class LSauthMethod_basic extends LSauthMethod { /** * Check authentication * - * @retval LSldapObject|false The LSldapObject of the user authificated or false + * @return LSldapObject|false The LSldapObject of the user authificated or false */ public function authenticate() { $authobjects = LSauth :: username2LSobjects($this -> authData['username']); diff --git a/src/includes/class/class.LScli.php b/src/includes/class/class.LScli.php index 7108d709..431c13ac 100644 --- a/src/includes/class/class.LScli.php +++ b/src/includes/class/class.LScli.php @@ -38,20 +38,20 @@ class LScli extends LSlog_staticLoggerClass { /** * Add a CLI command * - * @param[in] $command string The CLI command name (required) - * @param[in] $handler callable The CLI command handler (must be callable, required) - * @param[in] $short_desc string|false A short description of what this command does (required) - * @param[in] $usage_args string|false A short list of commands available arguments show in usage message + * @param string $command The CLI command name (required) + * @param callable $handler The CLI command handler (must be callable, required) + * @param string|false $short_desc A short description of what this command does (required) + * @param string|false $usage_args A short list of commands available arguments show in usage message * (optional, default: false) - * @param[in] $long_desc string|false A long description of what this command does (optional, default: false) - * @param[in] $need_ldap_con boolean Permit to define if this command need connection to LDAP server (optional, + * @param string|false $long_desc A long description of what this command does (optional, default: false) + * @param boolean $need_ldap_con Permit to define if this command need connection to LDAP server (optional, * default: true) - * @param[in] $args_autocompleter callable|null Callable of the CLI command arguments autocompleter (optional, default: + * @param callable|null $args_autocompleter Callable of the CLI command arguments autocompleter (optional, default: * null) - * @param[in] $override boolean Allow override if a command already exists with the same name (optional, + * @param boolean $override Allow override if a command already exists with the same name (optional, * default: false) * - * @retval void + * @return void **/ public static function add_command($command, $handler, $short_desc, $usage_args=false, $long_desc=false, $need_ldap_con=true, $args_autocompleter=null, $override=false) { @@ -79,8 +79,8 @@ class LScli extends LSlog_staticLoggerClass { /** * Show usage message * - * @param[in] $error string|false Error message to display before usage message (optional, default: false) - * @retval void + * @param string|false $error Error message to display before usage message (optional, default: false) + * @return void **/ public static function usage($error=false) { global $argv; @@ -125,7 +125,7 @@ class LScli extends LSlog_staticLoggerClass { /** * Handle CLI arguments and run command (if provided) * - * @retval void + * @return void **/ public static function handle_args() { if (php_sapi_name() != "cli") { @@ -260,11 +260,11 @@ class LScli extends LSlog_staticLoggerClass { /** * Run command * - * @param[in] $command string The command name - * @param[in] $command string The command arguments (optional, default: array()) - * @param[in] $exit boolean If true, function will exit after command execution (optional, default: true) + * @param string $command The command name + * @param string $command The command arguments (optional, default: array()) + * @param boolean $exit If true, function will exit after command execution (optional, default: true) * - * @retval void|boolean If $exit is False, return boolean casted command return + * @return void|boolean If $exit is False, return boolean casted command return **/ public static function run_command($command, $command_args=array(), $exit=true) { if (php_sapi_name() != "cli") { @@ -301,7 +301,7 @@ class LScli extends LSlog_staticLoggerClass { /** * Start LDAP connection (if not already connected) * - * @retval void + * @return void **/ public static function need_ldap_con() { // Connect to LDAP server (if not already the case) @@ -314,14 +314,14 @@ class LScli extends LSlog_staticLoggerClass { /** * Run external command * - * @param[in] $command string|array The command. It's could be an array of the command with its arguments. - * @param[in] $data_stdin string|null The command arguments (optional, default: null) - * @param[in] $escape_command_args boolean If true, the command will be escaped (optional, default: true) - * @param[in] $cwd string|null The initial working dir for the command + * @param string|array $command The command. It's could be an array of the command with its arguments. + * @param string|null $data_stdin The command arguments (optional, default: null) + * @param boolean $escape_command_args If true, the command will be escaped (optional, default: true) + * @param string|null $cwd The initial working dir for the command * (optional, default: null = use current PHP * process working directory) * - * @retval false|array An array of return code, stdout and stderr result or False in case of fatal error + * @return false|array An array of return code, stdout and stderr result or False in case of fatal error **/ public static function run_external_command($command, $data_stdin=null, $escape_command_args=true, $cwd=null) { if (array($command)) @@ -365,9 +365,9 @@ class LScli extends LSlog_staticLoggerClass { /** * CLI helper to ask for user confirmation * - * @param[in] $question string The confirmation question (optional, default: "Are you sure?") + * @param string $question The confirmation question (optional, default: "Are you sure?") * - * @retval boolean True if user confirmed, false otherwise + * @return boolean True if user confirmed, false otherwise **/ public static function confirm($question=null) { if (is_null($question)) @@ -386,9 +386,9 @@ class LScli extends LSlog_staticLoggerClass { /** * CLI command to handle BASH command autocompleter * - * @param[in] $command_args array Command arguments + * @param array $command_args Command arguments * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function bash_autocomplete($command_args) { if (count($command_args) < 3) @@ -548,9 +548,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Print list of available autocomplete options as required by BASH * - * @param[in] $list mixed List of available autocomplete options if it's an array + * @param mixed $list List of available autocomplete options if it's an array * - * @retval boolean True if $list is an array, false otherwise + * @return boolean True if $list is an array, false otherwise **/ public static function return_bash_autocomplete_list($list) { if (is_array($list)) { @@ -563,9 +563,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete class name * - * @param[in] $prefix string Class name prefix (optional, default=empty string) + * @param string $prefix Class name prefix (optional, default=empty string) * - * @retval array List of matched class names + * @return array List of matched class names **/ public static function autocomplete_class_name($prefix='', $quote_char=null) { $classes = array(); @@ -585,9 +585,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete addon name * - * @param[in] $prefix string Addon name prefix (optional, default=empty string) + * @param string $prefix Addon name prefix (optional, default=empty string) * - * @retval array List of matched addon names + * @return array List of matched addon names **/ public static function autocomplete_addon_name($prefix='') { $addons = array(); @@ -606,13 +606,13 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete options * - * @param[in] $opts array Available options - * @param[in] $prefix string Option name prefix (optional, default=empty string) - * @param[in] $case_sensitive boolean Set to false if options are case insensitive (optional, default=true) - * @param[in] $quote_char boolean Quote character (optional, if not set, $prefix will be unquoted and its + * @param array $opts Available options + * @param string $prefix Option name prefix (optional, default=empty string) + * @param boolean $case_sensitive Set to false if options are case insensitive (optional, default=true) + * @param boolean $quote_char Quote character (optional, if not set, $prefix will be unquoted and its * quote char (if detected) will be used to quote options) * - * @retval array List of matched options + * @return array List of matched options **/ public static function autocomplete_opts($opts, $prefix='', $case_sensitive=true, $quote_char='') { if (!is_string($prefix) || strlen($prefix)==0) @@ -637,9 +637,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete integer option * - * @param[in] $prefix string Option prefix (optional, default=empty string) + * @param string $prefix Option prefix (optional, default=empty string) * - * @retval array List of available options + * @return array List of available options **/ public static function autocomplete_int($prefix='', $quote_char='') { $opts = array(); @@ -652,9 +652,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete boolean option * - * @param[in] $prefix string Option prefix (optional, default=empty string) + * @param string $prefix Option prefix (optional, default=empty string) * - * @retval array List of available options + * @return array List of available options **/ public static function autocomplete_bool($prefix='', $quote_char='') { return self :: autocomplete_opts(array('0', '1'), $prefix, false, $quote_char); @@ -663,12 +663,12 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete LSobject type option * - * @param[in] $prefix string Option prefix (optional, default=empty string) - * @param[in] $case_sensitive boolean Set to false if options are case insensitive (optional, default=true) - * @param[in] $quote_char boolean Quote character (optional, if not set, $prefix will be unquoted and its + * @param string $prefix Option prefix (optional, default=empty string) + * @param boolean $case_sensitive Set to false if options are case insensitive (optional, default=true) + * @param boolean $quote_char Quote character (optional, if not set, $prefix will be unquoted and its * quote char (if detected) will be used to quote options) * - * @retval array List of available options + * @return array List of available options **/ public static function autocomplete_LSobject_types($prefix='', $case_sensitive=true, $quote_char='') { $subdn_config = LSconfig :: get('subDn', null, null, LSsession :: $ldapServer); @@ -717,13 +717,13 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete LSobject DN option * - * @param[in] $objType string LSobject type - * @param[in] $prefix string Option prefix (optional, default=empty string) - * @param[in] $case_sensitive boolean Set to false if options are case insensitive (optional, default=true) - * @param[in] $quote_char boolean Quote character (optional, if not set, $prefix will be unquoted and its + * @param string $objType LSobject type + * @param string $prefix Option prefix (optional, default=empty string) + * @param boolean $case_sensitive Set to false if options are case insensitive (optional, default=true) + * @param boolean $quote_char Quote character (optional, if not set, $prefix will be unquoted and its * quote char (if detected) will be used to quote options) * - * @retval array List of available options + * @return array List of available options **/ public static function autocomplete_LSobject_dn($objType, $prefix='', $case_sensitive=true, $quote_char='') { if (!LSsession ::loadLSobject($objType, false)) @@ -756,13 +756,13 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete LSobject ioFormat option * - * @param[in] $objType string LSobject type - * @param[in] $prefix string Option prefix (optional, default=empty string) - * @param[in] $case_sensitive boolean Set to false if options are case insensitive (optional, default=true) - * @param[in] $quote_char boolean Quote character (optional, if not set, $prefix will be unquoted and its + * @param string $objType LSobject type + * @param string $prefix Option prefix (optional, default=empty string) + * @param boolean $case_sensitive Set to false if options are case insensitive (optional, default=true) + * @param boolean $quote_char Quote character (optional, if not set, $prefix will be unquoted and its * quote char (if detected) will be used to quote options) * - * @retval array List of available options + * @return array List of available options **/ public static function autocomplete_LSobject_ioFormat($objType, $prefix='', $case_sensitive=true, $quote_char='') { if (!LSsession ::loadLSobject($objType, false)) @@ -781,9 +781,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Autocomplete LSformRule name * - * @param[in] $prefix string LSformRule name prefix (optional, default=empty string) + * @param string $prefix LSformRule name prefix (optional, default=empty string) * - * @retval array List of matched LSformRule names + * @return array List of matched LSformRule names **/ public static function autocomplete_LSformRule_name($prefix='', $quote_char=null) { $rules = array(); @@ -797,9 +797,9 @@ class LScli extends LSlog_staticLoggerClass { /** * Unquote a word * - * @param[in] &$word string Reference of the word to unquote + * @param string &$word Reference of the word to unquote * - * @retval string The quote character or an empty string if word if not quoted + * @return string The quote character or an empty string if word if not quoted */ public static function unquote_word(&$word) { if (in_array($word[0], array('"', "'"))) { @@ -815,11 +815,11 @@ class LScli extends LSlog_staticLoggerClass { /** * Quote a word * - * @param[in] $word string The word to quote - * @param[in] $quote_char string The quote character. If not defined or empty, the input word + * @param string $word The word to quote + * @param string $quote_char The quote character. If not defined or empty, the input word * will be returned unmodified. * - * @retval string The quoted word + * @return string The quoted word */ public static function quote_word($word, $quote_char) { if (!$quote_char) return $word; diff --git a/src/includes/class/class.LSconfig.php b/src/includes/class/class.LSconfig.php index 868b19c8..b8ac7594 100644 --- a/src/includes/class/class.LSconfig.php +++ b/src/includes/class/class.LSconfig.php @@ -36,7 +36,7 @@ class LSconfig { * Chargement initiale des données de configuration à partir des fichiers en * config.*.php du dossier LS_CONF_DIR * - * @retval boolean True si tout s'est bien passé, False sinon + * @return boolean True si tout s'est bien passé, False sinon **/ public static function start() { $files=array('config.inc.php','config.LSaddons.php'); @@ -56,15 +56,15 @@ class LSconfig { /** * Get a specific configuration variable value * - * @param[in] $var string The configuration variable name - * @param[in] $default mixed The default value to return if configuration variable + * @param string $var The configuration variable name + * @param mixed $default The default value to return if configuration variable * is not set (Default : null) - * @param[in] $cast string The type of expected value. The configuration variable + * @param string $cast The type of expected value. The configuration variable * value will be cast as this type. Could be : bool, int, * float or string. (Optional, default : raw value) - * @param[in] $data array The configuration data (optional) + * @param array $data The configuration data (optional) * - * @retval mixed The configuration variable value + * @return mixed The configuration variable value **/ public static function get($var, $default=null, $cast=null, $data=null) { $vars = explode('.', $var); @@ -98,10 +98,10 @@ class LSconfig { /** * Get list of keys of a specific configuration variable * - * @param[in] $var string The configuration variable name - * @param[in] $data array The configuration data (optional) + * @param string $var The configuration variable name + * @param array $data The configuration data (optional) * - * @retval array An array of the keys of a specific configuration variable + * @return array An array of the keys of a specific configuration variable **/ public static function keys($var, $data=null) { $value = self :: get($var, null, null, $data); @@ -115,13 +115,13 @@ class LSconfig { * variable name. In this case, the keys of the parent value will be iterated to compose * the result. * - * @param[in] $pattern string The configuration variable pattern - * @param[in] $default mixed The default value to return if configuration variable + * @param string $pattern The configuration variable pattern + * @param mixed $default The default value to return if configuration variable * is not set (optional, see self :: get()) - * @param[in] $cast string The type of expected value (optional, see self :: get()) - * @param[in] $data array The configuration data (optional, see self :: get()) + * @param string $cast The type of expected value (optional, see self :: get()) + * @param array $data The configuration data (optional, see self :: get()) * - * @retval array The list of matching configuration variables with their value + * @return array The list of matching configuration variables with their value **/ public static function getMatchingKeys($pattern, $default=null, $cast=null, $data=null, $prefix=null) { $return = array(); @@ -151,10 +151,10 @@ class LSconfig { /** * Définition d'une valeur * - * @param[in] $var string Le nom de valeur à définir - * @param[in] $val mixed La valeur de la variable + * @param string $var Le nom de valeur à définir + * @param mixed $val La valeur de la variable * - * @retval boolean True si tout s'est bien passé, False sinon + * @return boolean True si tout s'est bien passé, False sinon **/ public static function set($var,$val) { $vars=explode('.',$var); diff --git a/src/includes/class/class.LSconfirmBox.php b/src/includes/class/class.LSconfirmBox.php index bbc84776..a00f1fbd 100644 --- a/src/includes/class/class.LSconfirmBox.php +++ b/src/includes/class/class.LSconfirmBox.php @@ -25,7 +25,7 @@ class LSconfirmBox { /* * Méthode chargeant les dépendances d'affichage * - * @retval void + * @return void */ public static function loadDependenciesDisplay() { LStemplate :: addJSscript('LSconfirmBox.js'); diff --git a/src/includes/class/class.LSerror.php b/src/includes/class/class.LSerror.php index c03707f4..4a2d8971 100644 --- a/src/includes/class/class.LSerror.php +++ b/src/includes/class/class.LSerror.php @@ -38,12 +38,12 @@ class LSerror { * * @author Benjamin Renard * - * @param[in] $code string The error code - * @param[in] $msg LSformat The LSformat of the error message - * @param[in] $escape boolean Set to false if you don't want the message + * @param string $code The error code + * @param LSformat $msg The LSformat of the error message + * @param boolean $escape Set to false if you don't want the message * to be escaped on display (Default: true) * - * @retval void + * @return void */ public static function defineError($code=-1, $msg='', $escape=True) { self :: $_errorCodes[$code] = array( @@ -57,16 +57,16 @@ class LSerror { * * @author Benjamin Renard * - * @param[in] $code string The error code - * @param[in] $msg mixed If error code is not specified (or not defined), it could content the + * @param string $code The error code + * @param mixed $msg If error code is not specified (or not defined), it could content the * the error message. If error code is provided (and defined), this parameter * will be used to format registred error message (as LSformat). In this case, * it could be any of data support by getFData function as $data parameter. * - * @param[in] $escape boolean Set to false if you don't want the message + * @param boolean $escape Set to false if you don't want the message * to be escaped on display (Default: true) * - * @retval void + * @return void */ public static function addErrorCode($code=null, $msg=null, $escape=true) { $_SESSION['LSerror'][] = self :: formatError($code, $msg, $escape); @@ -79,11 +79,11 @@ class LSerror { * * @author Benjamin Renard * - * @param[in] $return boolean True if you want to retrieved errors message. If false, + * @param boolean $return True if you want to retrieved errors message. If false, * (default), LSerrors template variable will be assigned * with errors message. * - * @retval string|null + * @return string|null */ public static function display($return=False) { $errors = self :: getErrors(); @@ -98,11 +98,11 @@ class LSerror { * * @author Benjamin Renard * - * @param[in] $code Error code (see addErrorCode()) - * @param[in] $msg Error msg (see addErrorCode()) - * @param[in] $escape boolean (see addErrorCode()) + * @param string $code Error code (see addErrorCode()) + * @param string $msg Error msg (see addErrorCode()) + * @param boolean $escape (see addErrorCode()) * - * @retval void + * @return void */ public static function stop($code=-1, $msg='', $escape=true) { if(!empty($_SESSION['LSerror'])) { @@ -190,9 +190,9 @@ class LSerror { /** * Check if is Net_LDAP2 error and display possible error message * - * @param[in] $data mixed Data + * @param mixed $data Data * - * @retval boolean True if it's an error or False + * @return boolean True if it's an error or False **/ public static function isLdapError($data) { if (Net_LDAP2::isError($data)) { diff --git a/src/includes/class/class.LSform.php b/src/includes/class/class.LSform.php index 1580492d..aa5340ab 100644 --- a/src/includes/class/class.LSform.php +++ b/src/includes/class/class.LSform.php @@ -64,10 +64,10 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $idForm [required] string L'identifiant du formulaire - * @param[in] $submit string La valeur du bouton submit + * @param string $idForm L'identifiant du formulaire + * @param string $submit La valeur du bouton submit * - * @retval void + * @return void */ public function __construct(&$ldapObject, $idForm, $submit=NULL, $api_mode=false){ $this -> idForm = $idForm; @@ -90,7 +90,7 @@ class LSform extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> config); @@ -99,7 +99,7 @@ class LSform extends LSlog_staticLoggerClass { /** * Allow conversion of LSform to string * - * @retval string The string representation of the LSform + * @return string The string representation of the LSform */ public function __toString() { return " idForm." on ".$this -> ldapObject -> toString(false).">"; @@ -108,10 +108,10 @@ class LSform extends LSlog_staticLoggerClass { /** * Display the form * - * @param[in] $LSform_action string|null The form action attribute value (optional, default: $_SERVER['PHP_SELF']) + * @param string|null $LSform_action The form action attribute value (optional, default: $_SERVER['PHP_SELF']) * @author Benjamin Renard * - * @retval void + * @return void */ public function display($LSform_action=null){ // Load view dependencies @@ -212,7 +212,7 @@ class LSform extends LSlog_staticLoggerClass { /* * Méthode chargeant les dépendances d'affichage d'une LSview * - * @retval void + * @return void */ public static function loadDependenciesDisplayView($ldapObject=false, $search_view=false) { LStemplate :: addCssFile('LSform.css'); @@ -260,7 +260,7 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval void + * @return void */ public function displayView(){ self :: loadDependenciesDisplayView($this -> ldapObject); @@ -288,12 +288,12 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $attr [required] string Le nom du champ - * @param[in] $msg Le format du message d'erreur à afficher (pouvant comporter - * des valeurs %{[n'importe quoi]} qui seront remplacé par le label - * du champs concerné. + * @param string $attrLe nom du champ + * @param string $msg Le format du message d'erreur à afficher (pouvant comporter + * des valeurs %{[n'importe quoi]} qui seront remplacé par le label + * du champs concerné. * - * @retval void + * @return void */ public function setElementError($attr,$msg=NULL) { if($msg!='') { @@ -311,9 +311,9 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $element [required] string Le nom de l'élement + * @param string $attrLe nom de l'élement * - * @retval boolean + * @return boolean */ public function definedError($element=NULL) { if ($element) { @@ -327,7 +327,7 @@ class LSform extends LSlog_staticLoggerClass { /** * Retourne le tableau des erreurs * - * @retval Array array(element => array(errors)) + * @return array array(element => array(errors)) */ public function getErrors() { return $this -> _elementsErrors; @@ -336,11 +336,11 @@ class LSform extends LSlog_staticLoggerClass { /** * Check form is submited and its data are validat * - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * @author Benjamin Renard * - * @retval boolean true if form is submited and its data are valid, false otherwise + * @return boolean true if form is submited and its data are valid, false otherwise */ public function validate($onlyIfPresent=false){ if(!$this -> can_validate) @@ -370,7 +370,7 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si toutes la saisie est OK, false sinon + * @return boolean true si toutes la saisie est OK, false sinon */ public function checkData() { $retval=true; @@ -415,9 +415,9 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $data array tableau de valeurs + * @param string $submit tableau de valeurs * - * @retval boolean true si au moins une valeur est présente, false sinon + * @return boolean true si au moins une valeur est présente, false sinon */ public function checkRequired($data) { foreach($data as $val) { @@ -432,7 +432,7 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si la saisie du formulaire est présente en POST, false sinon + * @return boolean true si la saisie du formulaire est présente en POST, false sinon */ public function isSubmit() { if ($this -> submited) @@ -445,7 +445,7 @@ class LSform extends LSlog_staticLoggerClass { /** * Set form as submited * - * @retval void + * @return void */ public function setSubmited() { $this -> submited = true; @@ -456,10 +456,10 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $data array('attr' => array(values)) Tableau des données du formulaire - * @param[in] $consideredAsSubmit Définie si on force le formualaire comme envoyer + * @param array $data Tableau des données du formulaire : array('attr' => array(values)) + * @param bool $consideredAsSubmit Définie si on force le formualaire comme envoyer * - * @retval boolean true si les données ont été définies, false sinon + * @return boolean true si les données ont été définies, false sinon */ public function setPostData($data,$consideredAsSubmit=false) { if (is_array($data)) { @@ -483,11 +483,11 @@ class LSform extends LSlog_staticLoggerClass { /** * Retrieve POST data of the form * - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * @author Benjamin Renard * - * @retval boolean true if POST data are retrieved, false otherwise + * @return boolean true if POST data are retrieved, false otherwise */ public function getPostData($onlyIfPresent=false) { if (is_null($this -> dataEntryForm)) { @@ -542,12 +542,12 @@ class LSform extends LSlog_staticLoggerClass { * * Ajoute un élément au formulaire et définis les informations le concernant. * - * @param[in] $type string Le type de l'élément - * @param[in] $name string Le nom de l'élément - * @param[in] $label string Le label de l'élément - * @param[in] $param mixed Paramètres supplémentaires + * @param string $submit Le type de l'élément + * @param string $submit Le nom de l'élément + * @param string $submit Le label de l'élément + * @param string $submit Paramètres supplémentaires * - * @retval LSformElement + * @return LSformElement */ public function addElement($type,$name,$label,$params,&$attr_html) { $elementType='LSformElement_'.$type; @@ -570,9 +570,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Check if form has a specified element (by attr name) * - * @param[in] $attr string The element/attribute name + * @param string $submit The element/attribute name * - * @retval boolean + * @return boolean **/ public function hasElement($name) { return isset($this -> elements[$name]); @@ -581,9 +581,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Check if a specified element (by attr name) is freezed * - * @param[in] $attr string The element/attribute name + * @param string $submit The element/attribute name * - * @retval boolean + * @return boolean **/ public function isFreeze($name) { return isset($this -> elements[$name]) && $this -> elements[$name] -> isFreeze($name); @@ -594,11 +594,11 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $element string Le nom de l'élément conserné - * @param[in] $rule string Le nom de la règle à ajouter - * @param[in] $options array Options (facultative) + * @param string $submit Le nom de l'élément conserné + * @param string $submit Le nom de la règle à ajouter + * @param string $submit Options (facultative) * - * @retval boolean + * @return boolean */ public function addRule($element, $rule, $options=null) { if ( isset($this ->elements[$element]) ) { @@ -628,9 +628,9 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $element string Le nom de l'élément conserné + * @param string $submit Le nom de l'élément conserné * - * @retval boolean + * @return boolean */ public function setRequired($element) { if (isset( $this -> elements[$element] ) ) @@ -646,7 +646,7 @@ class LSform extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $element string Le nom de l'élément conserné + * @param string $submit Le nom de l'élément conserné */ public function isRuleRegistered($rule) { LSsession :: loadLSclass('LSformRule'); @@ -657,7 +657,7 @@ class LSform extends LSlog_staticLoggerClass { /** * Retourne les valeurs validés du formulaire * - * @retval mixed Les valeurs validés du formulaire, ou false si elles ne le sont pas + * @return mixed Les valeurs validés du formulaire, ou false si elles ne le sont pas */ public function exportValues() { if ($this -> _isValidate) { @@ -675,9 +675,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Retourn un élement du formulaire * - * @param[in] string $element Nom de l'élement voulu + * @param string $element Nom de l'élement voulu * - * @retval LSformElement L'élement du formulaire voulu + * @return LSformElement L'élement du formulaire voulu */ public function getElement($element) { return $this -> elements[$element]; @@ -689,9 +689,9 @@ class LSform extends LSlog_staticLoggerClass { * If form is posted, retrieve values from postData, otherwise * retrieve value from the element. * - * @param[in] string $element The element name + * @param string $element The element name * - * @retval mixed The element values + * @return mixed The element values **/ public function getValue($element) { if ($this -> isSubmit() && $this -> _postData) { @@ -703,7 +703,7 @@ class LSform extends LSlog_staticLoggerClass { /** * Défini les valeurs des élements à partir des valeurs postées * - * @retval boolean True si les valeurs ont été définies, false sinon. + * @return boolean True si les valeurs ont été définies, false sinon. */ public function setValuesFromPostData() { if (empty($this -> _postData)) { @@ -718,10 +718,10 @@ class LSform extends LSlog_staticLoggerClass { /** * Return the HTML code of an empty form field * - * @param[in] $element string The form element name - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param string $submit The form element name + * @param string|null $LSform_action The value index (optional, default: null == 0) * - * @retval string|null The HTML code of the specified field if exist, null otherwise + * @return string|null The HTML code of the specified field if exist, null otherwise */ public function getEmptyField($element, $value_idx=null) { $element = $this -> getElement($element); @@ -736,9 +736,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Défini la taille maximal pour les fichiers envoyés par le formualaire * - * @param[in] $size La taille maximal en octets + * @param int $size La taille maximal en octets * - * @retval void + * @return void **/ public function setMaxFileSize($size) { $this -> maxFileSize = $size; @@ -747,9 +747,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Applique un masque de saisie au formulaire * - * @param[in] $dataEntryForm string Le nom du masque de saisie + * @param string $submit Le nom du masque de saisie * - * @retval boolean True si le masque de saisie a été appliqué, False sinon + * @return boolean True si le masque de saisie a été appliqué, False sinon **/ public function applyDataEntryForm($dataEntryForm) { $dataEntryForm=(string)$dataEntryForm; @@ -781,9 +781,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Liste les dataEntryForm disponible pour un type d'LSldapObject * - * @param[in] $type string Le type d'LSldapObject + * @param string $submit Le type d'LSldapObject * - * @retval array Tableau contenant la liste de dataEntryForm disponible pour ce type d'LSldapObject (nom => label) + * @return array Tableau contenant la liste de dataEntryForm disponible pour ce type d'LSldapObject (nom => label) **/ public static function listAvailableDataEntryForm($type) { $retval=array(); @@ -807,9 +807,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Ajoute un avertissement au sujet du formulaire * - * @param[in] $txt string Le texte de l'avertissement + * @param string $submit Le texte de l'avertissement * - * @retval void + * @return void **/ public function addWarning($txt) { $this -> warnings[]=$txt; @@ -818,9 +818,9 @@ class LSform extends LSlog_staticLoggerClass { /** * Méthode Ajax permetant de retourner le code HTML d'un élément du formulaire vide * - * @param[in] &$data Variable de retour + * @param array &$data Variable de retour * - * @retval void + * @return void **/ public static function ajax_onAddFieldBtnClick(&$data) { if ((isset($_REQUEST['attribute'])) && (isset($_REQUEST['objecttype'])) && (isset($_REQUEST['objectdn'])) && (isset($_REQUEST['idform'])) && (isset($_REQUEST['fieldId'])) ) { @@ -845,11 +845,11 @@ class LSform extends LSlog_staticLoggerClass { /** * CLI autocompleter for form attributes values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") + * @param array &$opts Array of avalaible autocomplete options + * @param string $submit The command word to autocomplete + * @param string $submit The multiple value delimiter (optional, default: "|") * - * @retval void + * @return void */ public function autocomplete_attrs_values(&$opts, $comp_word, $multiple_value_delimiter='|') { if ($comp_word && strpos($comp_word, '=') !== false) { diff --git a/src/includes/class/class.LSformElement.php b/src/includes/class/class.LSformElement.php index a1b3eced..1825ccea 100644 --- a/src/includes/class/class.LSformElement.php +++ b/src/includes/class/class.LSformElement.php @@ -49,13 +49,13 @@ class LSformElement extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] &$form LSform The LSform parent object - * @param[in] $name string The name of the element - * @param[in] $label string The label of the element - * @param[in] $params array The parameters of the element - * @param[in] &$attr_html LSattr_html The LSattr_html object of the corresponding attribute + * @param LSform &$form The LSform parent object + * @param string $name The name of the element + * @param string $name The label of the element + * @param string $name The parameters of the element + * @param LSform &$form The LSattr_html object of the corresponding attribute * - * @retval void + * @return void */ public function __construct(&$form, $name, $label, $params, &$attr_html){ $this -> name = $name; @@ -68,7 +68,7 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Allow conversion of LSformElement to string * - * @retval string The string representation of the LSformElement + * @return string The string representation of the LSformElement */ public function __toString() { return strval($this -> form)." -> <".get_class($this)." ".$this -> name.">"; @@ -81,9 +81,9 @@ class LSformElement extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] [required] string or array La futur valeur de l'élément + * @param string|array $data La futur valeur de l'élément * - * @retval boolean Retourne True + * @return boolean Retourne True */ public function setValue($data) { $this -> values = ensureIsArray($data); @@ -99,9 +99,9 @@ class LSformElement extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] [required] string or array La futur valeur de l'élément + * @param string|array $data La futur valeur de l'élément * - * @retval boolean Retourne True + * @return boolean Retourne True */ public function setValueFromPostData($data) { $this -> values = ensureIsArray($data); @@ -112,7 +112,7 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Exporte les valeurs de l'élément * - * @retval Array Les valeurs de l'élement + * @return array Les valeurs de l'élement */ public function exportValues(){ return $this -> values; @@ -125,9 +125,9 @@ class LSformElement extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] [required] string or array La futur valeur de l'élément + * @param string|array $data La futur valeur de l'élément * - * @retval void + * @return void */ public function addValue($data) { $this -> values = array_merge($this -> values, ensureIsArray($data)); @@ -138,7 +138,7 @@ class LSformElement extends LSlog_staticLoggerClass { * * Cette méthode test si l'élément est éditable * - * @retval boolean + * @return boolean */ public function isFreeze(){ return $this -> _freeze; @@ -149,7 +149,7 @@ class LSformElement extends LSlog_staticLoggerClass { * * Rend l'élément non-editable * - * @retval void + * @return void */ public function freeze() { $this -> _freeze = true; @@ -158,9 +158,9 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Défini la propriété required de l'élément. * - * param[in] $isRequired boolean true si l'élément est requis, false sinon + * param boolean $isRequired true si l'élément est requis, false sinon * - * @retval void + * @return void */ public function setRequired($isRequired=true) { $this -> _required = $isRequired; @@ -171,7 +171,7 @@ class LSformElement extends LSlog_staticLoggerClass { * * Cette méthode test si l'élément est requis * - * @retval boolean + * @return boolean */ public function isRequired(){ return $this -> _required; @@ -180,7 +180,7 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Retourne le label de l'élement * - * @retval void + * @return void */ public function getLabelInfos() { if ($this -> isRequired()) { @@ -207,11 +207,11 @@ class LSformElement extends LSlog_staticLoggerClass { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -234,10 +234,10 @@ class LSformElement extends LSlog_staticLoggerClass { * Retrieve the value of the element specified by its name ($name) * from POST data (provided as $post). * - * @param[in] &$post array Reference of the array for input POST data - * @param[in] $name string POST data element name + * @param array &$return Reference of the array for input POST data + * @param string $name POST data element name * - * @retval mixed Array of POST data value if present, false otherwise + * @return mixed Array of POST data value if present, false otherwise */ protected static function getData(&$post, $name) { if (isset($post[$name])) { @@ -258,7 +258,7 @@ class LSformElement extends LSlog_staticLoggerClass { * * Retourne $this -> label, ou $this -> params['label'], ou $this -> name * - * @retval string Le label de l'élément + * @return string Le label de l'élément */ public function getLabel() { if ($this -> label != "") { @@ -270,7 +270,7 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Le champ est-il a valeur multiple * - * @retval boolean True si le champ est à valeur multiple, False sinon + * @return boolean True si le champ est à valeur multiple, False sinon */ public function isMultiple() { return $this -> getParam('multiple', false, 'bool'); @@ -279,10 +279,10 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Return HTML code of the LSformElement based on its (smarty) template file * - * @param[in] $template string The template filename (optional, default: $this -> template) - * @param[in] $variables array Array of template variables to assign before template compilation (optional) + * @param string $name The template filename (optional, default: $this -> template) + * @param string $name Array of template variables to assign before template compilation (optional) * - * @retval string HTML code of the LSformElement + * @return string HTML code of the LSformElement */ public function fetchTemplate($template=NULL,$variables=array()) { if (!$template) { @@ -310,9 +310,9 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -330,7 +330,7 @@ class LSformElement extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The parameter value or default value if not set + * @return mixed The parameter value or default value if not set **/ public function getParam($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> params); @@ -339,14 +339,14 @@ class LSformElement extends LSlog_staticLoggerClass { /** * CLI autocompleter for form element attribute values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The (unquoted) command word to autocomplete - * @param[in] $attr_value string The current attribute value in command word to autocomplete + * @param array &$return Array of avalaible autocomplete options + * @param string $name The (unquoted) command word to autocomplete + * @param string $name The current attribute value in command word to autocomplete * (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character detected (optional, default: empty string) + * @param string $name The multiple value delimiter (optional, default: "|") + * @param string $name The quote character detected (optional, default: empty string) * - * @retval void + * @return void */ public function autocomplete_attr_values(&$opts, $comp_word, $attr_value="", $multiple_value_delimiter="|", $quote_char='') { return; @@ -355,15 +355,14 @@ class LSformElement extends LSlog_staticLoggerClass { /** * CLI autocompleter helper to split form element attribute values * - * @param[in] $attr_value string The current attribute value in command word to autocomplete + * @param string $attr_value The current attribute value in command word to autocomplete * (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] &$attr_values Reference of array Reference of array that will contain splited attribute - * values without last-one - * @param[in] &$last_attr_value Reference of string Reference of array that will contain the last splited attribute - * value + * @param string $multiple_value_delimiter The multiple value delimiter (optional, default: "|") + * @param array &$attr_values &array Array that will contain splited attribute values without + * last-one + * @param string &$last_attr_value Array that will contain the last splited attribute value * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ protected function split_autocomplete_attr_values($attr_value, $multiple_value_delimiter, &$attr_values, &$last_attr_value) { $attr_values = explode($multiple_value_delimiter, $attr_value); @@ -380,13 +379,13 @@ class LSformElement extends LSlog_staticLoggerClass { /** * CLI autocompleter helper to format and add form element attribute value option * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] &$attr_values Reference of array Reference of array of splited attribute values without last-one - * @param[in] $value string The attribute value to add as option - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character (optional, default: empty string) + * @param array &$opts Array of avalaible autocomplete options + * @param array &$attr_values Array of splited attribute values without last-one + * @param string $value The attribute value to add as option + * @param string $multiple_value_delimiter The multiple value delimiter (optional, default: "|") + * @param string $quote_char The quote character (optional, default: empty string) * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ protected function add_autocomplete_attr_value_opts(&$opts, &$attr_values, $value, $multiple_value_delimiter='|', $quote_char='') { if (in_array($value, $attr_values)) { @@ -404,10 +403,10 @@ class LSformElement extends LSlog_staticLoggerClass { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $onlyIfPresent If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { if (method_exists($this, 'parseValue')) { diff --git a/src/includes/class/class.LSformElement_boolean.php b/src/includes/class/class.LSformElement_boolean.php index 5b7a1901..cc87d9c9 100644 --- a/src/includes/class/class.LSformElement_boolean.php +++ b/src/includes/class/class.LSformElement_boolean.php @@ -40,7 +40,7 @@ class LSformElement_boolean extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -67,13 +67,13 @@ class LSformElement_boolean extends LSformElement { /** * CLI autocompleter for form element attribute values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The (unquoted) command word to autocomplete - * @param[in] $attr_value string The current attribute value in command word to autocomplete (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character detected (optional, default: empty string) + * @param array &$opts Array of avalaible autocomplete options + * @param string $comp_word The (unquoted) command word to autocomplete + * @param string $attr_value The current attribute value in command word to autocomplete (optional, default: empty string) + * @param string $multiple_value_delimiter The multiple value delimiter (optional, default: "|") + * @param string $quote_char The quote character detected (optional, default: empty string) * - * @retval void + * @return void */ public function autocomplete_attr_values(&$opts, $comp_word, $attr_value="", $multiple_value_delimiter="|", $quote_char='') { // Split attribute values and retrieved splited value in $attr_values and $last_attr_value diff --git a/src/includes/class/class.LSformElement_date.php b/src/includes/class/class.LSformElement_date.php index 9125039d..c44db788 100644 --- a/src/includes/class/class.LSformElement_date.php +++ b/src/includes/class/class.LSformElement_date.php @@ -69,9 +69,9 @@ class LSformElement_date extends LSformElement { * * @author Benjamin Renard * - * @param[in] [required] string or array La futur valeur de l'élément + * @param string|array $data La futur valeur de l'élément * - * @retval boolean Retourne True + * @return boolean Retourne True */ public function setValue($data) { $special_values = $this -> getSpecialValues(); @@ -97,7 +97,7 @@ class LSformElement_date extends LSformElement { /** * Exporte les valeurs de l'élément * - * @retval Array Les valeurs de l'élement + * @return array Les valeurs de l'élement */ public function exportValues(){ $retval=array(); @@ -124,7 +124,7 @@ class LSformElement_date extends LSformElement { /** * Retourne le format d'affichage de la date * - * @retval string Le format de la date + * @return string Le format de la date **/ public function getFormat() { return $this -> getParam('html_options.format', ($this -> getParam('html_options.time', true)?'%d/%m/%Y, %T':'%d/%m/%Y')); @@ -133,7 +133,7 @@ class LSformElement_date extends LSformElement { /** * Return date picker style value * - * @retval string The date picker style + * @return string The date picker style **/ public function getStyle() { $style = $this -> getParam('html_options.style', $this -> default_style, 'string'); @@ -151,7 +151,7 @@ class LSformElement_date extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -196,10 +196,10 @@ class LSformElement_date extends LSformElement { /** * Retournne un template Smarty compilé dans le contexte d'un LSformElement * - * @param[in] string $template Le template à retourner - * @param[in] array $variables Variables Smarty à assigner avant l'affichage + * @param string $template Le template à retourner + * @param array $variables Variables Smarty à assigner avant l'affichage * - * @retval string Le HTML compilé du template + * @return string Le HTML compilé du template */ public function fetchTemplate($template=NULL, $variables=array()) { $variables['special_values'] = $this -> getSpecialValues(); @@ -212,11 +212,11 @@ class LSformElement_date extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -267,7 +267,7 @@ class LSformElement_date extends LSformElement { /** * Convertis un format de date Php (strftime) en JS (jscalendar) * - * @retval mixed Format de date jscalendar (string) ou False si la convertion + * @return mixed Format de date jscalendar (string) ou False si la convertion * n'a pas réussi. */ public function php2js_format($format) { diff --git a/src/includes/class/class.LSformElement_image.php b/src/includes/class/class.LSformElement_image.php index cc4c3978..946c92a3 100644 --- a/src/includes/class/class.LSformElement_image.php +++ b/src/includes/class/class.LSformElement_image.php @@ -40,7 +40,7 @@ class LSformElement_image extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ LStemplate :: addCssFile('LSformElement_image.css'); @@ -86,11 +86,11 @@ class LSformElement_image extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -140,7 +140,7 @@ class LSformElement_image extends LSformElement { /** * Get file upload error message * - * @retval string The translated file upload error message + * @return string The translated file upload error message */ private function getFileUploadErrorMessage() { if (isset($_FILES[$this -> name]) && isset($_FILES[$this -> name]['error'])) { @@ -167,10 +167,10 @@ class LSformElement_image extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $onlyIfPresent If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { if ($this -> isMultiple()) { diff --git a/src/includes/class/class.LSformElement_jsonCompositeAttribute.php b/src/includes/class/class.LSformElement_jsonCompositeAttribute.php index 71d40ace..2e0a03a8 100644 --- a/src/includes/class/class.LSformElement_jsonCompositeAttribute.php +++ b/src/includes/class/class.LSformElement_jsonCompositeAttribute.php @@ -69,7 +69,7 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { /** * Parse values * - * @retval array Parsed values + * @return array Parsed values */ private function parseValues() { self :: log_trace('values: '.varDump($this -> values)); @@ -94,7 +94,7 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -126,10 +126,10 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { /** * Retournne un template Smarty compilé dans le contexte d'un LSformElement * - * @param[in] string $template Le template à retourner - * @param[in] array $variables Variables Smarty à assigner avant l'affichage + * @param string $template Le template à retourner + * @param string $template Variables Smarty à assigner avant l'affichage * - * @retval string Le HTML compilé du template + * @return string Le HTML compilé du template */ public function fetchTemplate($template=NULL,$variables=array()) { $components = $this -> components; @@ -150,11 +150,11 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * - value : untranslated value * - translated : translated value * - * @param[in] $c string The component name - * @param[in] $value string The value - * @param[in] $inLoop boolean Internal param to control recursion + * @param string $c The component name + * @param string $c The value + * @param boolean $inLoop Internal param to control recursion * - * @retval array + * @return array **/ protected function translateComponentValue($c,$value,$inLoop=false) { if (!$inLoop && isset($this -> components[$c]['multiple']) && $this -> components[$c]['multiple']) { @@ -180,9 +180,9 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { /** * Retrieve possible values of an select_list component * - * @param[in] $c string The component name + * @param string $c The component name * - * @retval array + * @return array **/ protected $_cache_getSelectListComponentPossibleValues=array(); protected function getSelectListComponentPossibleValues($c) { @@ -203,10 +203,10 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { /** * Retrieve value's label of an select_list component * - * @param[in] $c string The component name - * @param[in] $value string The value + * @param string $c The component name + * @param string $c The value * - * @retval array + * @return array **/ protected function getSelectListComponentValueLabel($c, $value) { if ($this -> getSelectListComponentPossibleValues($c)) { @@ -229,11 +229,11 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * This method check present of this element's value in POST data and retrieve * it to feed the array passed in paramater. * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $inLoop If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true if value is in POST data, false instead + * @return boolean true if value is in POST data, false instead */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -381,7 +381,7 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * @param[] $c The component name * @param[] $value The values of the component * - * @retval void + * @return void **/ private function checkComponentValues($c, $value) { // Check select_list component's values @@ -423,7 +423,7 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * @param[] $c The component name * @param[] $value The value to check * - * @retval void + * @return void **/ private function checkSelectListComponentValue($c, $value) { if (!$this -> getSelectListComponentValueLabel($c, $value)) { @@ -448,7 +448,7 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getComponentConfig($component, $param, $default=null, $cast=null) { return LSconfig :: get( @@ -460,10 +460,10 @@ class LSformElement_jsonCompositeAttribute extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $inLoop If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { $values = array(); diff --git a/src/includes/class/class.LSformElement_labeledValue.php b/src/includes/class/class.LSformElement_labeledValue.php index bfe3ee59..6e3f2bb8 100644 --- a/src/includes/class/class.LSformElement_labeledValue.php +++ b/src/includes/class/class.LSformElement_labeledValue.php @@ -41,7 +41,7 @@ class LSformElement_labeledValue extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -70,9 +70,9 @@ class LSformElement_labeledValue extends LSformElement { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -88,10 +88,10 @@ class LSformElement_labeledValue extends LSformElement { /** * Parse one value * - * @param[in] $value string The value to parse - * @param[in] $details boolean Enable/disable details return (optional, default: true) + * @param string $value The value to parse + * @param boolean $details Enable/disable details return (optional, default: true) * - * @retval array Parsed value + * @return array Parsed value */ public function parseValue($value, $details=true) { if (!$details) @@ -110,11 +110,11 @@ class LSformElement_labeledValue extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { diff --git a/src/includes/class/class.LSformElement_mail.php b/src/includes/class/class.LSformElement_mail.php index 7c6f6f44..517723aa 100644 --- a/src/includes/class/class.LSformElement_mail.php +++ b/src/includes/class/class.LSformElement_mail.php @@ -53,13 +53,13 @@ class LSformElement_mail extends LSformElement_text { * * @author Benjamin Renard * - * @param[in] &$form LSform The LSform parent object - * @param[in] $name string The name of the element - * @param[in] $label string The label of the element - * @param[in] $params array The parameters of the element - * @param[in] &$attr_html LSattr_html The LSattr_html object of the corresponding attribute + * @param LSform &$form The LSform parent object + * @param string $name The name of the element + * @param string $label The label of the element + * @param array $params The parameters of the element + * @param LSattr_html &$attr_html The LSattr_html object of the corresponding attribute * - * @retval void + * @return void */ public function __construct(&$form, $name, $label, $params, &$attr_html){ parent::__construct($form, $name, $label, $params, $attr_html); @@ -98,10 +98,10 @@ class LSformElement_mail extends LSformElement_text { /** * Return HTML code of the LSformElement based on its (smarty) template file * - * @param[in] $template string The template filename (optional, default: $this -> template) - * @param[in] $variables array Array of template variables to assign before template compilation (optional) + * @param string $template The template filename (optional, default: $this -> template) + * @param array $variables Array of template variables to assign before template compilation (optional) * - * @retval string HTML code of the LSformElement + * @return string HTML code of the LSformElement */ public function fetchTemplate($template=NULL,$variables=array()) { if ($this -> getParam('html_options.disableMailSending', false, 'bool')) { diff --git a/src/includes/class/class.LSformElement_mailQuota.php b/src/includes/class/class.LSformElement_mailQuota.php index 204ae2ad..221d73f5 100644 --- a/src/includes/class/class.LSformElement_mailQuota.php +++ b/src/includes/class/class.LSformElement_mailQuota.php @@ -44,10 +44,10 @@ class LSformElement_mailQuota extends LSformElement { /** * Parse one value * - * @param[in] $value string The value to parse - * @param[in] $details boolean Enable/disable details return (optional, default: true) + * @param string $value The value to parse + * @param boolean $details Enable/disable details return (optional, default: true) * - * @retval array Parsed value + * @return array Parsed value */ public function parseValue($value, $details=true) { if (preg_match('/^([0-9]+)'.$this -> getSuffix().'$/', $value, $regs)) { @@ -84,7 +84,7 @@ class LSformElement_mailQuota extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -118,9 +118,9 @@ class LSformElement_mailQuota extends LSformElement { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -136,7 +136,7 @@ class LSformElement_mailQuota extends LSformElement { /** * Return suffix value * - * @retval string Suffix value + * @return string Suffix value **/ public function getSuffix() { return $this -> getParam('html_options.suffix', 'S', 'string'); @@ -148,11 +148,11 @@ class LSformElement_mailQuota extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { diff --git a/src/includes/class/class.LSformElement_maildir.php b/src/includes/class/class.LSformElement_maildir.php index ecf3c626..115f038d 100644 --- a/src/includes/class/class.LSformElement_maildir.php +++ b/src/includes/class/class.LSformElement_maildir.php @@ -80,11 +80,11 @@ class LSformElement_maildir extends LSformElement_text { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { // Récupère la valeur dans _POST, et les vérifie avec la fonction générale diff --git a/src/includes/class/class.LSformElement_password.php b/src/includes/class/class.LSformElement_password.php index ce6c9030..c580f745 100644 --- a/src/includes/class/class.LSformElement_password.php +++ b/src/includes/class/class.LSformElement_password.php @@ -43,11 +43,11 @@ class LSformElement_password extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { // Récupère la valeur dans _POST, et les vérifie avec la fonction générale @@ -166,7 +166,7 @@ class LSformElement_password extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ LStemplate :: addCssFile('LSformElement_password.css'); @@ -444,13 +444,13 @@ class LSformElement_password extends LSformElement { /** * CLI autocompleter for form element attribute values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The (unquoted) command word to autocomplete - * @param[in] $attr_value string The current attribute value in command word to autocomplete (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character detected (optional, default: empty string) + * @param array &$opts Array of avalaible autocomplete options + * @param string $comp_word The (unquoted) command word to autocomplete + * @param string $attr_value The current attribute value in command word to autocomplete (optional, default: empty string) + * @param string $multiple_value_delimiter The multiple value delimiter (optional, default: "|") + * @param string $quote_char The quote character detected (optional, default: empty string) * - * @retval void + * @return void */ public function autocomplete_attr_values(&$opts, $comp_word, $attr_value="", $multiple_value_delimiter="|", $quote_char='') { // Split attribute values and retrieved splited value in $attr_values and $last_attr_value diff --git a/src/includes/class/class.LSformElement_postaladdress.php b/src/includes/class/class.LSformElement_postaladdress.php index fbcca806..a3dd13da 100644 --- a/src/includes/class/class.LSformElement_postaladdress.php +++ b/src/includes/class/class.LSformElement_postaladdress.php @@ -37,7 +37,7 @@ class LSformElement_postaladdress extends LSformElement_textarea { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = parent :: getDisplay(); diff --git a/src/includes/class/class.LSformElement_pre.php b/src/includes/class/class.LSformElement_pre.php index 51fcf98a..97b77a1d 100644 --- a/src/includes/class/class.LSformElement_pre.php +++ b/src/includes/class/class.LSformElement_pre.php @@ -37,7 +37,7 @@ class LSformElement_pre extends LSformElement_textarea { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = parent :: getDisplay(); diff --git a/src/includes/class/class.LSformElement_quota.php b/src/includes/class/class.LSformElement_quota.php index 008d132d..debc73cc 100644 --- a/src/includes/class/class.LSformElement_quota.php +++ b/src/includes/class/class.LSformElement_quota.php @@ -45,10 +45,10 @@ class LSformElement_quota extends LSformElement { /** * Parse one value * - * @param[in] $value string The value to parse - * @param[in] $details boolean Enable/disable details return (optional, default: true) + * @param string $value The value to parse + * @param boolean $details Enable/disable details return (optional, default: true) * - * @retval array Parsed value + * @return array Parsed value */ public function parseValue($value, $details=true) { if (preg_match('/^([0-9]+)$/', $value, $regs)) { @@ -85,7 +85,7 @@ class LSformElement_quota extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -119,9 +119,9 @@ class LSformElement_quota extends LSformElement { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -140,11 +140,11 @@ class LSformElement_quota extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -190,7 +190,7 @@ class LSformElement_quota extends LSformElement { /** * Retrieve factor value * - * @retval integer Factor value + * @return integer Factor value */ private function getFactor() { return $this -> getParam('html_options.factor', 1, 'int'); diff --git a/src/includes/class/class.LSformElement_sambaAcctFlags.php b/src/includes/class/class.LSformElement_sambaAcctFlags.php index 1095af18..6177bc60 100644 --- a/src/includes/class/class.LSformElement_sambaAcctFlags.php +++ b/src/includes/class/class.LSformElement_sambaAcctFlags.php @@ -38,7 +38,7 @@ class LSformElement_sambaAcctFlags extends LSformElement_select_box { * * This method return display data of this element * - * @retval array + * @return array */ public function isMultiple(){ return true; diff --git a/src/includes/class/class.LSformElement_select.php b/src/includes/class/class.LSformElement_select.php index dfc155d4..340d8830 100644 --- a/src/includes/class/class.LSformElement_select.php +++ b/src/includes/class/class.LSformElement_select.php @@ -40,7 +40,7 @@ class LSformElement_select extends LSformElement { * * This method return display data of this element * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -66,9 +66,9 @@ class LSformElement_select extends LSformElement { * This method check if a value is correct, that mean if it's one * of the possible values. * - * @param[in] $value The value to check + * @param string $value The value to check * - * @retval string or False The value's label or False if this value is incorrect + * @return string or False The value's label or False if this value is incorrect */ public function isValidValue($value) { return self :: _isValidValue($value, $this -> getParam('text_possible_values')); @@ -80,10 +80,10 @@ class LSformElement_select extends LSformElement { * This method check if a value is correct, that mean if it's one * of the possible values. * - * @param[in] $value The value to check - * @param[in] $possible_values The possible values + * @param string $value The value to check + * @param array $possible_values The possible values * - * @retval string or False The value's label or False if this value is incorrect + * @return string or False The value's label or False if this value is incorrect */ public static function _isValidValue($value, $possible_values) { if (!is_array($possible_values)) { @@ -116,13 +116,13 @@ class LSformElement_select extends LSformElement { /** * CLI autocompleter for form element attribute values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The (unquoted) command word to autocomplete - * @param[in] $attr_value string The current attribute value in command word to autocomplete (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character detected (optional, default: empty string) + * @param array &$opts Array of avalaible autocomplete options + * @param string $comp_word The (unquoted) command word to autocomplete + * @param string $comp_word The current attribute value in command word to autocomplete (optional, default: empty string) + * @param string $comp_word The multiple value delimiter (optional, default: "|") + * @param string $comp_word The quote character detected (optional, default: empty string) * - * @retval void + * @return void */ public function autocomplete_attr_values(&$opts, $comp_word, $attr_value="", $multiple_value_delimiter="|", $quote_char='') { // Split attribute values and retrieved splited value in $attr_values and $last_attr_value @@ -145,10 +145,10 @@ class LSformElement_select extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $details If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { $values = array(); @@ -187,10 +187,10 @@ class LSformElement_select extends LSformElement { * - LSformElement_select_isValidValue_label : * The value's label * - * @param[in] $params The template function parameters - * @param[in] $template Smarty object + * @param array $params The template function parameters + * @param Smarty $template Smarty object * - * @retval void + * @return void **/ function LSformElement_select_checkIsValidValue($params, $template) { $ret = LSformElement_select :: _isValidValue($params['value'], $params['possible_values']); diff --git a/src/includes/class/class.LSformElement_select_box.php b/src/includes/class/class.LSformElement_select_box.php index a899a263..cda5a580 100644 --- a/src/includes/class/class.LSformElement_select_box.php +++ b/src/includes/class/class.LSformElement_select_box.php @@ -41,7 +41,7 @@ class LSformElement_select_box extends LSformElement_select { * * This method return display data of this element * - * @retval array + * @return array */ public function getDisplay(){ if (!$this -> isFreeze()) { diff --git a/src/includes/class/class.LSformElement_select_object.php b/src/includes/class/class.LSformElement_select_object.php index ca458558..d5bbe996 100644 --- a/src/includes/class/class.LSformElement_select_object.php +++ b/src/includes/class/class.LSformElement_select_object.php @@ -51,7 +51,7 @@ class LSformElement_select_object extends LSformElement { * * This method return the display informations of the element. * - * @retval array + * @return array */ public function getDisplay($refresh=NULL){ LStemplate :: addCssFile('LSformElement_select_object.css'); @@ -107,7 +107,7 @@ class LSformElement_select_object extends LSformElement { /** * Init LSselect * - * @retval boolean True if LSselect is initialized, false otherwise + * @return boolean True if LSselect is initialized, false otherwise */ private function initLSselect() { // Retrieve selectable objects configuratio from HTML attr @@ -142,10 +142,10 @@ class LSformElement_select_object extends LSformElement { /** * Function use with uasort to sort two values * - * @param[in] $va string One value - * @param[in] $vb string One value + * @param string $va One value + * @param string $va One value * - * @retval int Value for uasort + * @return int Value for uasort **/ private function _sortTwoValues(&$va,&$vb) { if ($this -> getParam('html_options.sortDirection') == 'DESC') { @@ -169,7 +169,7 @@ class LSformElement_select_object extends LSformElement { /** * Export the values of the element * - * @retval Array The values of the element + * @return array The values of the element */ public function exportValues(){ $values = $this -> attr_html -> getValuesFromFormValues($this -> values); @@ -181,9 +181,9 @@ class LSformElement_select_object extends LSformElement { * * @author Benjamin Renard * - * @param[in] [required] string or array The new value of the element + * @param string|array $data The new value of the element * - * @retval boolean Return True + * @return boolean Return True */ public function setValueFromPostData($data) { parent :: setValueFromPostData($data); @@ -196,9 +196,9 @@ class LSformElement_select_object extends LSformElement { /** * Search the selectionable objects with a pattern * - * @param[in] $pattern The pattern of the search + * @param string $pattern The pattern of the search * - * @retval array(dn -> displayName) Found objects + * @return array(dn -> displayName) Found objects */ public function searchAdd($pattern) { $objs = array(); @@ -238,9 +238,9 @@ class LSformElement_select_object extends LSformElement { * This ajax method is used to refresh the value display * in the form element after the modify LSselect window is closed. * - * @param[in] $data The address to the array of data witch will be return by the ajax request + * @param array &$data The address to the array of data witch will be return by the ajax request * - * @retval void + * @return void **/ public static function ajax_refresh(&$data) { if ((isset($_REQUEST['attribute'])) && (isset($_REQUEST['objecttype'])) && (isset($_REQUEST['objectdn'])) && (isset($_REQUEST['idform'])) ) { @@ -271,9 +271,9 @@ class LSformElement_select_object extends LSformElement { /** * This ajax method is used by the search-and-add function of the form element. * - * @param[in] $data The address to the array of data witch will be return by the ajax request + * @param array &$data The address to the array of data witch will be return by the ajax request * - * @retval void + * @return void **/ public static function ajax_searchAdd(&$data) { if ((isset($_REQUEST['attribute'])) && (isset($_REQUEST['objecttype'])) && (isset($_REQUEST['pattern'])) && (isset($_REQUEST['idform'])) ) { @@ -289,13 +289,13 @@ class LSformElement_select_object extends LSformElement { /** * CLI autocompleter for form element attribute values * - * @param[in] &$opts array Reference of array of avalaible autocomplete options - * @param[in] $comp_word string The (unquoted) command word to autocomplete - * @param[in] $attr_value string The current attribute value in command word to autocomplete (optional, default: empty string) - * @param[in] $multiple_value_delimiter string The multiple value delimiter (optional, default: "|") - * @param[in] $quote_char string The quote character detected (optional, default: empty string) + * @param array &$opts Array of avalaible autocomplete options + * @param string $va The (unquoted) command word to autocomplete + * @param string $va The current attribute value in command word to autocomplete (optional, default: empty string) + * @param string $va The multiple value delimiter (optional, default: "|") + * @param string $va The quote character detected (optional, default: empty string) * - * @retval void + * @return void */ public function autocomplete_attr_values(&$opts, $comp_word, $attr_value="", $multiple_value_delimiter="|", $quote_char='') { self :: log_debug("LSformElement :: autocomplete_opts([...], '$comp_word', '$attr_value', '$multiple_value_delimiter', '$quote_char')"); @@ -325,10 +325,10 @@ class LSformElement_select_object extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $details If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { $values = ($details?$this -> values:array_keys(ensureIsArray($this -> values))); diff --git a/src/includes/class/class.LSformElement_ssh_key.php b/src/includes/class/class.LSformElement_ssh_key.php index 34d0ecd2..4636eab8 100644 --- a/src/includes/class/class.LSformElement_ssh_key.php +++ b/src/includes/class/class.LSformElement_ssh_key.php @@ -39,10 +39,10 @@ class LSformElement_ssh_key extends LSformElement { /** * Parse one value * - * @param[in] $value string The value to parse - * @param[in] $details boolean Enable/disable details return (optional, default: true) + * @param string $value The value to parse + * @param boolean $details Enable/disable details return (optional, default: true) * - * @retval array Parsed value + * @return array Parsed value */ public function parseValue($value, $details=true) { if (!$details) @@ -66,7 +66,7 @@ class LSformElement_ssh_key extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ LStemplate :: addCssFile('LSformElement_ssh_key.css'); diff --git a/src/includes/class/class.LSformElement_supannAdressePostalePrivee.php b/src/includes/class/class.LSformElement_supannAdressePostalePrivee.php index b88854c7..068b1a39 100644 --- a/src/includes/class/class.LSformElement_supannAdressePostalePrivee.php +++ b/src/includes/class/class.LSformElement_supannAdressePostalePrivee.php @@ -41,9 +41,9 @@ class LSformElement_supannAdressePostalePrivee extends LSformElement_supannLabel /** * Parse une valeur * - * @param[in] $value La valeur + * @param string $value La valeur * - * @retval array Un tableau cle->valeur contenant value, translated et label + * @return array Un tableau cle->valeur contenant value, translated et label **/ public function parseValue($value) { $retval = parent :: parseValue($value); @@ -60,7 +60,7 @@ class LSformElement_supannAdressePostalePrivee extends LSformElement_supannLabel * pas des caractères '$'. * @see LSformElement::getPostData() - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { $retval = parent :: getPostData($return, $onlyIfPresent); diff --git a/src/includes/class/class.LSformElement_supannCompositeAttribute.php b/src/includes/class/class.LSformElement_supannCompositeAttribute.php index bbf8448d..9f8b5638 100644 --- a/src/includes/class/class.LSformElement_supannCompositeAttribute.php +++ b/src/includes/class/class.LSformElement_supannCompositeAttribute.php @@ -74,13 +74,13 @@ class LSformElement_supannCompositeAttribute extends LSformElement { * * @author Benjamin Renard * - * @param[in] &$form LSform The LSform parent object - * @param[in] $name string The name of the element - * @param[in] $label string The label of the element - * @param[in] $params array The parameters of the element - * @param[in] &$attr_html LSattr_html The LSattr_html object of the corresponding attribute + * @param LSform &$form The LSform parent object + * @param string $name The name of the element + * @param string $name The label of the element + * @param string $name The parameters of the element + * @param LSform &$form The LSattr_html object of the corresponding attribute * - * @retval void + * @return void */ public function __construct(&$form, $name, $label, $params, &$attr_html){ parent :: __construct($form, $name, $label, $params, $attr_html); @@ -151,7 +151,7 @@ class LSformElement_supannCompositeAttribute extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -218,9 +218,9 @@ class LSformElement_supannCompositeAttribute extends LSformElement { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -241,10 +241,10 @@ class LSformElement_supannCompositeAttribute extends LSformElement { * - value : la valeur brute * - translated : la valeur traduite ou la valeur elle même * - * @param[in] $c string Le nom du composant - * @param[in] $val string La valeur + * @param string $name Le nom du composant + * @param string $name La valeur * - * @retval array + * @return array **/ function translateComponentValue($c, $val) { $retval = array ( @@ -322,11 +322,11 @@ class LSformElement_supannCompositeAttribute extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { @@ -508,9 +508,9 @@ class LSformElement_supannCompositeAttribute extends LSformElement { /** * This ajax method is used by the searchComponentPossibleValues function of the form element. * - * @param[in] $data The address to the array of data witch will be return by the ajax request + * @param array &$data The address to the array of data witch will be return by the ajax request * - * @retval void + * @return void **/ public static function ajax_searchComponentPossibleValues(&$data) { if ((isset($_REQUEST['attribute'])) && (isset($_REQUEST['objecttype'])) && (isset($_REQUEST['component'])) && (isset($_REQUEST['pattern'])) && (isset($_REQUEST['idform'])) ) { @@ -564,10 +564,10 @@ class LSformElement_supannCompositeAttribute extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $onlyIfPresent If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { $values = array(); diff --git a/src/includes/class/class.LSformElement_supannLabeledValue.php b/src/includes/class/class.LSformElement_supannLabeledValue.php index e240c726..37f3f6f0 100644 --- a/src/includes/class/class.LSformElement_supannLabeledValue.php +++ b/src/includes/class/class.LSformElement_supannLabeledValue.php @@ -48,7 +48,7 @@ class LSformElement_supannLabeledValue extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -91,9 +91,9 @@ class LSformElement_supannLabeledValue extends LSformElement { /** * Parse une valeur * - * @param[in] $value La valeur + * @param string $value La valeur * - * @retval array Un tableau cle->valeur contenant value, translated et label + * @return array Un tableau cle->valeur contenant value, translated et label **/ public function parseValue($value) { $retval = array( @@ -122,11 +122,11 @@ class LSformElement_supannLabeledValue extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { $retval = parent :: getPostData($return, $onlyIfPresent); @@ -164,9 +164,9 @@ class LSformElement_supannLabeledValue extends LSformElement { /** * This ajax method is used by the searchPossibleValues function of the form element. * - * @param[in] $data The address to the array of data witch will be return by the ajax request + * @param array &$data The address to the array of data witch will be return by the ajax request * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise **/ public static function ajax_searchPossibleValues(&$data) { // Check all parameters is provided @@ -185,9 +185,9 @@ class LSformElement_supannLabeledValue extends LSformElement { /** * Real private method to search possible values from pattern. * - * @param[in] $pattern The search pattern + * @param string $pattern The search pattern * - * @retval boolean|array Array of possible values, or False is case of error + * @return boolean|array Array of possible values, or False is case of error **/ private function searchPossibleValues($pattern) { if (!$this -> supannNomenclatureTable) @@ -212,10 +212,10 @@ class LSformElement_supannLabeledValue extends LSformElement { /** * Retrieve value as return in API response * - * @param[in] $details boolean If true, returned values will contain details if this field type + * @param boolean $details If true, returned values will contain details if this field type * support it (optional, default: false) * - * @retval mixed API value(s) or null/empty array if no value + * @return mixed API value(s) or null/empty array if no value */ public function getApiValue($details=false) { $values = array(); diff --git a/src/includes/class/class.LSformElement_text.php b/src/includes/class/class.LSformElement_text.php index 4b9e722a..25472273 100644 --- a/src/includes/class/class.LSformElement_text.php +++ b/src/includes/class/class.LSformElement_text.php @@ -47,7 +47,7 @@ class LSformElement_text extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -81,10 +81,10 @@ class LSformElement_text extends LSformElement { /** * Return HTML code of the LSformElement based on its (smarty) template file * - * @param[in] $template string The template filename (optional, default: $this -> template) - * @param[in] $variables array Array of template variables to assign before template compilation (optional) + * @param string $template The template filename (optional, default: $this -> template) + * @param string $template Array of template variables to assign before template compilation (optional) * - * @retval string HTML code of the LSformElement + * @return string HTML code of the LSformElement */ public function fetchTemplate($template=NULL,$variables=array()) { if ($this -> getParam('html_options.autocomplete.value_attributes', null, 'array')) { @@ -97,9 +97,9 @@ class LSformElement_text extends LSformElement { /** * Autocomplete value * - * @param[in] $pattern The pattern of the search + * @param string $pattern The pattern of the search * - * @retval array(value -> displayName) Found values + * @return array(value -> displayName) Found values */ public function autocomplete($pattern) { $ret = array(); @@ -241,9 +241,9 @@ class LSformElement_text extends LSformElement { /** * This ajax method is used by the autocomplete function of the form element. * - * @param[in] $data The address to the array of data witch will be return by the ajax request + * @param array &$data The address to the array of data witch will be return by the ajax request * - * @retval void + * @return void **/ public static function ajax_autocomplete(&$data) { if ((isset($_REQUEST['attribute'])) && (isset($_REQUEST['objecttype'])) && (isset($_REQUEST['pattern'])) && (isset($_REQUEST['idform'])) ) { diff --git a/src/includes/class/class.LSformElement_textarea.php b/src/includes/class/class.LSformElement_textarea.php index 33e48106..4b7641b2 100644 --- a/src/includes/class/class.LSformElement_textarea.php +++ b/src/includes/class/class.LSformElement_textarea.php @@ -40,7 +40,7 @@ class LSformElement_textarea extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); diff --git a/src/includes/class/class.LSformElement_valueWithUnit.php b/src/includes/class/class.LSformElement_valueWithUnit.php index 7b589392..ce0a18b0 100644 --- a/src/includes/class/class.LSformElement_valueWithUnit.php +++ b/src/includes/class/class.LSformElement_valueWithUnit.php @@ -37,7 +37,7 @@ class LSformElement_valueWithUnit extends LSformElement { /** * Retourne les unites de l'attribut * - * @retval array|False Le tableau contenant en cle les seuils et en valeur les labels des unites. + * @return array|False Le tableau contenant en cle les seuils et en valeur les labels des unites. * Si le parametre units n'est pas defini, cette fonction retournera False **/ public function getUnits() { @@ -61,7 +61,7 @@ class LSformElement_valueWithUnit extends LSformElement { * This method return take a number as paremeter and * return it after formatting. * - * @param[in] int|float $number The number + * @param int|float $number The number * * @retbal string Formatted number */ @@ -77,10 +77,10 @@ class LSformElement_valueWithUnit extends LSformElement { /** * Parse one value * - * @param[in] $value string The value to parse - * @param[in] $details boolean Enable/disable details return (optional, default: true) + * @param string $value The value to parse + * @param boolean $details Enable/disable details return (optional, default: true) * - * @retval array Parsed value + * @return array Parsed value */ public function parseValue($value, $details=true) { if (preg_match('/^([0-9]*)$/' ,$value, $regs)) { @@ -119,7 +119,7 @@ class LSformElement_valueWithUnit extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); @@ -156,9 +156,9 @@ class LSformElement_valueWithUnit extends LSformElement { /** * Return HTML code of an empty form field * - * @param[in] $value_idx integer|null The value index (optional, default: null == 0) + * @param integer|null $value_idx The value index (optional, default: null == 0) * - * @retval string The HTML code of an empty field + * @return string The HTML code of an empty field */ public function getEmptyField($value_idx=null) { return $this -> fetchTemplate( @@ -177,11 +177,11 @@ class LSformElement_valueWithUnit extends LSformElement { * Cette méthode vérifie la présence en POST de la valeur de l'élément et la récupère * pour la mettre dans le tableau passer en paramètre avec en clef le nom de l'élément * - * @param[in] &$return array Reference of the array for retrieved values - * @param[in] $onlyIfPresent boolean If true and data of this element is not present in POST data, + * @param array &$return Reference of the array for retrieved values + * @param boolean $onlyIfPresent If true and data of this element is not present in POST data, * just ignore it. * - * @retval boolean true si la valeur est présente en POST, false sinon + * @return boolean true si la valeur est présente en POST, false sinon */ public function getPostData(&$return, $onlyIfPresent=false) { if($this -> isFreeze()) { diff --git a/src/includes/class/class.LSformElement_wysiwyg.php b/src/includes/class/class.LSformElement_wysiwyg.php index c364d1de..2a2d8630 100644 --- a/src/includes/class/class.LSformElement_wysiwyg.php +++ b/src/includes/class/class.LSformElement_wysiwyg.php @@ -38,7 +38,7 @@ class LSformElement_wysiwyg extends LSformElement { * * Cette méthode retourne les informations d'affichage de l'élement * - * @retval array + * @return array */ public function getDisplay(){ $return = $this -> getLabelInfos(); diff --git a/src/includes/class/class.LSformRule.php b/src/includes/class/class.LSformRule.php index c89da01a..6d18a1f6 100644 --- a/src/includes/class/class.LSformRule.php +++ b/src/includes/class/class.LSformRule.php @@ -100,14 +100,14 @@ class LSformRule extends LSlog_staticLoggerClass { /** * CLI test_form_rule command * - * @param[in] $command_args array Command arguments : + * @param array $command_args Command arguments : * - Positional arguments : * - LSformRule type * - values to test * - Optional arguments : * - -p|--param: LSformRule parameters (format: param=value) * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_test_form_rule($command_args) { $rule_name = null; @@ -152,12 +152,12 @@ class LSformRule extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI test_form_rule command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param array $command_args List of already typed words of the command + * @param array $command_args The command word number to autocomplete + * @param array $command_args The command word to autocomplete + * @param array $command_args List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_test_form_rule_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array('-p', '--param')); @@ -236,10 +236,10 @@ class LSformRule extends LSlog_staticLoggerClass { /** * Args autocompleter for parameter name of CLI test_form_rule command * - * @param[in] $prefix string Parameter name prefix (optional, default=empty string) - * @param[in] $quote_char $quote_char string Quote character (optional, default=empty string) + * @param array $command_args Parameter name prefix (optional, default=empty string) + * @param string $quote_char Quote character (optional, default=empty string) * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_test_form_rule_param_name_autocompleter($prefix='', $quote_char='') { $opts = LScli :: autocomplete_opts(array_keys(static :: $cli_params_autocompleters), $prefix); @@ -252,11 +252,11 @@ class LSformRule extends LSlog_staticLoggerClass { /** * Args autocompleter for parameter name of CLI test_form_rule command * - * @param[in] $param_name string The parameter name - * @param[in] $prefix string Parameter name prefix (optional, default=empty string) - * @param[in] $quote_char $quote_char string Quote character (optional, default=empty string) + * @param array $command_args The parameter name + * @param array $command_args Parameter name prefix (optional, default=empty string) + * @param string $quote_char Quote character (optional, default=empty string) * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_test_form_rule_param_value_autocompleter($param_name, $prefix='', $quote_char='') { if ( diff --git a/src/includes/class/class.LSio.php b/src/includes/class/class.LSio.php index 1894ef17..4b28b402 100644 --- a/src/includes/class/class.LSio.php +++ b/src/includes/class/class.LSio.php @@ -33,11 +33,11 @@ class LSio extends LSlog_staticLoggerClass { /** * Check if the form was posted by check POST data * - * @param[in] $action string The action name used as POST validate flag value + * @param string $action The action name used as POST validate flag value * * @author Benjamin Renard * - * @retval boolean true if the form was posted, false otherwise + * @return boolean true if the form was posted, false otherwise */ public static function isSubmit($action) { if (isset($_REQUEST['validate']) && ($_REQUEST['validate']==$action)) @@ -49,7 +49,7 @@ class LSio extends LSlog_staticLoggerClass { /** * Retrieve the post file * - * @retval mixed The path of the temporary file, false on error + * @return mixed The path of the temporary file, false on error */ public static function getPostFile() { if (is_uploaded_file($_FILES['importfile']['tmp_name'])) { @@ -81,7 +81,7 @@ class LSio extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval mixed Array of POST data, false on error + * @return mixed Array of POST data, false on error */ public static function getPostData() { if (isset($_REQUEST['LSobject']) && isset($_POST['ioFormat'])) { @@ -106,7 +106,7 @@ class LSio extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval array Array of the import result + * @return array Array of the import result * @see import() */ public static function importFromPostData() { @@ -171,17 +171,17 @@ class LSio extends LSlog_staticLoggerClass { * ) * ) * - * @param[in] $LSobject string The LSobject type - * @param[in] $ioFormat string The LSioFormat name - * @param[in] $input_file string|resource The input file path - * @param[in] $updateIfExists boolean If true and object to import already exists, update it. If false, + * @param string $action The LSobject type + * @param string $action The LSioFormat name + * @param string|resource $input_file The input file path + * @param boolean $updateIfExists If true and object to import already exists, update it. If false, * an error will be triggered. (optional, default: false) - * @param[in] $justTry boolean If true, enable just-try mode: just check input data but do not really + * @param boolean $updateIfExists If true, enable just-try mode: just check input data but do not really * import objects in LDAP directory. (optional, default: false) * * @author Benjamin Renard * - * @retval array Array of the import result + * @return array Array of the import result */ public static function import($LSobject, $ioFormat, $input_file, $updateIfExists=false, $justTry=false) { $return = array( @@ -338,13 +338,13 @@ class LSio extends LSlog_staticLoggerClass { /** * Export objects * - * @param[in] $LSobject LSldapObject An instance of the object type - * @param[in] $ioFormat string The LSioFormat name - * @param[in] $stream resource|null The output stream (optional, default: STDOUT) + * @param LSldapObject $LSobject An instance of the object type + * @param string $action The LSioFormat name + * @param resource|null $stream The output stream (optional, default: STDOUT) * * @author Benjamin Renard * - * @retval boolean True on success, False otherwise + * @return boolean True on success, False otherwise */ public static function export($object, $ioFormat, $stream=null) { // Load LSobject @@ -401,7 +401,7 @@ class LSio extends LSlog_staticLoggerClass { /** * CLI import command * - * @param[in] $command_args array Command arguments: + * @param string $action Command arguments: * - Positional arguments: * - LSobject type * - LSioFormat name @@ -410,7 +410,7 @@ class LSio extends LSlog_staticLoggerClass { * - -U|--update: Enable "update if exist" * - -j|--just-try: Enable just-try mode * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_import($command_args) { $objType = null; @@ -506,12 +506,12 @@ class LSio extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI import command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $action List of already typed words of the command + * @param string $action The command word number to autocomplete + * @param string $action The command word to autocomplete + * @param string $action List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_import_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-i', '--input', '-U', '--update', '-j', '--just-try')); @@ -560,14 +560,14 @@ class LSio extends LSlog_staticLoggerClass { /** * CLI export command * - * @param[in] $command_args array Command arguments: + * @param string $action Command arguments: * - Positional arguments: * - LSobject type * - LSioFormat name * - Optional arguments: * - -o|--output: Output path ("-" == stdout, default: "-") * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_export($command_args) { $objType = null; @@ -610,12 +610,12 @@ class LSio extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI export command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $action List of already typed words of the command + * @param string $action The command word number to autocomplete + * @param string $action The command word to autocomplete + * @param string $action List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_export_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-o', '--output')); @@ -664,7 +664,7 @@ class LSio extends LSlog_staticLoggerClass { } -/* +/** * LSio_implodeValues template function * * This function permit to implode field values during @@ -672,10 +672,10 @@ class LSio extends LSlog_staticLoggerClass { * (in $params) : * - $values : the field's values to implode * - * @param[in] $params The template function parameters - * @param[in] $template Smarty object + * @param array $params The template function parameters + * @param Smarty $template Smarty object * - * @retval void + * @return void **/ function LSio_implodeValues($params, $template) { extract($params); diff --git a/src/includes/class/class.LSioFormat.php b/src/includes/class/class.LSioFormat.php index 8ea00a39..d3a3a144 100644 --- a/src/includes/class/class.LSioFormat.php +++ b/src/includes/class/class.LSioFormat.php @@ -35,10 +35,10 @@ class LSioFormat extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] string $LSobject The LSobject type name - * @param[in] string $ioFormat The ioFormat name + * @param string $LSobject The LSobject type name + * @param string $ioFormat The ioFormat name * - * @retval void + * @return void **/ public function __construct($LSobject, $ioFormat) { $conf = LSconfig::get('LSobjects.'.$LSobject.".ioFormat.".$ioFormat); @@ -59,7 +59,7 @@ class LSioFormat extends LSlog_staticLoggerClass { /** * Check if ioFormat driver is ready * - * @retval boolean True if ioFormat driver is ready, false otherwise + * @return boolean True if ioFormat driver is ready, false otherwise **/ public function ready() { return (is_array($this -> config) && $this -> driver !== False); @@ -72,7 +72,7 @@ class LSioFormat extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, (is_array($this -> config)?$this -> config:array())); @@ -81,9 +81,9 @@ class LSioFormat extends LSlog_staticLoggerClass { /** * Load and valid file * - * @param[in] string $file The file path to load + * @param string $file The file path to load * - * @retval boolean True if file is loaded and valid, false otherwise + * @return boolean True if file is loaded and valid, false otherwise **/ public function loadFile($file) { if ($this -> driver -> loadFile($file)) { @@ -95,7 +95,7 @@ class LSioFormat extends LSlog_staticLoggerClass { /** * Retrieve all objects contained by the loaded file * - * @retval array The objects contained by the loaded file + * @return array The objects contained by the loaded file **/ public function getAll() { return $this -> driver -> getAllFormated( @@ -107,8 +107,8 @@ class LSioFormat extends LSlog_staticLoggerClass { /** * Export objects * - * @param $objects array of LSldapObject The objects to export - * @param[in] $stream resource|null The output stream (optional, default: STDOUT) + * @param array[LSldapObject] $objects The objects to export + * @param resource|null $stream The output stream (optional, default: STDOUT) * * @return boolean True on success, False otherwise */ diff --git a/src/includes/class/class.LSioFormatCSV.php b/src/includes/class/class.LSioFormatCSV.php index 8b7f529a..8f3fd846 100644 --- a/src/includes/class/class.LSioFormatCSV.php +++ b/src/includes/class/class.LSioFormatCSV.php @@ -41,9 +41,9 @@ class LSioFormatCSV extends LSioFormatDriver { /** * Constructor * - * @param[in] array $options Driver's options + * @param array $options Driver's options * - * @retval void + * @return void **/ public function __construct($options) { parent :: __construct($options); @@ -68,9 +68,9 @@ class LSioFormatCSV extends LSioFormatDriver { /** * Load file * - * @param[in] string $file The file path to load + * @param array $options The file path to load * - * @retval boolean True if file is loaded, false otherwise + * @return boolean True if file is loaded, false otherwise **/ public function loadFile($path) { self :: log_debug("loadFile($path)"); @@ -101,7 +101,7 @@ class LSioFormatCSV extends LSioFormatDriver { /** * Check if loaded file data are valid * - * @retval boolean True if loaded file data are valid, false otherwise + * @return boolean True if loaded file data are valid, false otherwise **/ public function isValid() { if (!is_array($this -> rows) && empty($this -> rows)) { @@ -144,7 +144,7 @@ class LSioFormatCSV extends LSioFormatDriver { * ), * ) * - * @retval array The objects contained by the loaded file + * @return array The objects contained by the loaded file **/ public function getAll() { $objects = array(); @@ -171,7 +171,7 @@ class LSioFormatCSV extends LSioFormatDriver { * [...] * ) * - * @retval array The fields names of the loaded file + * @return array The fields names of the loaded file **/ public function getFieldNames() { return $this -> headers; @@ -181,9 +181,8 @@ class LSioFormatCSV extends LSioFormatDriver { /** * Export objects data * - * @param[in] $stream The stream where objects's data have to be exported - * @param[in] $objects_data Array of objects data to export - * @param[in] $stream resource|null The output stream (optional, default: STDOUT) + * @param array $objects_data of objects data to export + * @param resource|null $stream The output stream (optional, default: STDOUT) * * @return boolean True on success, False otherwise */ @@ -223,12 +222,12 @@ class LSioFormatCSV extends LSioFormatDriver { /** * Write CSV row to stream * - * @param[in] $stream The CSV file description reference - * @param[in] $row An array of a CSV row fields to write + * @param resource $stream The CSV file description reference + * @param array[string] $row An array of a CSV row fields to write * * @author Benjamin Renard * - * @retval boolean True if CSV row is successfully writed, false in other case + * @return boolean True if CSV row is successfully writed, false in other case */ private function writeRow($stream, $row) { // Escape character could only be specified since php 5.5.4 diff --git a/src/includes/class/class.LSioFormatDriver.php b/src/includes/class/class.LSioFormatDriver.php index fa270f2f..0437f919 100644 --- a/src/includes/class/class.LSioFormatDriver.php +++ b/src/includes/class/class.LSioFormatDriver.php @@ -34,9 +34,9 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] array $options Driver's options + * @param array $options Driver's options * - * @retval void + * @return void **/ public function __construct($options) { $this -> options = $options; @@ -45,9 +45,9 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { /** * Load file * - * @param[in] string $file The file path to load + * @param string $file The file path to load * - * @retval boolean True if file is loaded, false otherwise + * @return boolean True if file is loaded, false otherwise **/ public function loadFile($path) { return False; @@ -56,7 +56,7 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { /** * Check if loaded file data are valid * - * @retval boolean True if loaded file data are valid, false otherwise + * @return boolean True if loaded file data are valid, false otherwise **/ public function isValid() { return False; @@ -80,7 +80,7 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { * ), * ) * - * @retval array The objects contained by the loaded file + * @return array The objects contained by the loaded file **/ public function getAll() { return array(); @@ -97,7 +97,7 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { * [...] * ) * - * @retval array The fields names of the loaded file + * @return array The fields names of the loaded file **/ public function getFieldNames() { return array(); @@ -109,10 +109,10 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { * This method format objects data using ioFormat configuration * given as parameters. * - * @param[in] $fields Array of file's fields name mapping with object attribute - * @param[in] $generated_fields Array of object attribute to generate using other object data + * @param array $fields of file's fields name mapping with object attribute + * @param array $generated_fields of object attribute to generate using other object data * - * @retval array All objects data of the loaded file formated + * @return array All objects data of the loaded file formated **/ public function getAllFormated($fields, $generated_fields) { if (!is_array($fields)) return False; @@ -147,8 +147,8 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { /** * Export objects data * - * @param[in] $objects_data Array of objects data to export - * @param[in] $stream resource|null The output stream (optional, default: STDOUT) + * @param array $objects_data of objects data to export + * @param resource|null $stream The output stream (optional, default: STDOUT) * * @return boolean True on success, False otherwise */ @@ -164,7 +164,7 @@ class LSioFormatDriver extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The option parameter value or default value if not set + * @return mixed The option parameter value or default value if not set **/ public function getOption($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> options); diff --git a/src/includes/class/class.LSlang.php b/src/includes/class/class.LSlang.php index e968d754..67ec661c 100644 --- a/src/includes/class/class.LSlang.php +++ b/src/includes/class/class.LSlang.php @@ -32,12 +32,12 @@ class LSlang extends LSlog_staticLoggerClass { /** * Define current locale (and encoding) * - * @param[in] $lang string|null The lang (optional, default: default current LDAP + * @param string|null $lang The lang (optional, default: default current LDAP * server lang, or default lang) - * @param[in] $encoding string|null The encoding (optional, default: default current LDAP + * @param string|null $lang The encoding (optional, default: default current LDAP * server encoding, or default encoding) * - * @retval void + * @return void */ public static function setLocale($lang=null, $encoding=null) { // Handle $lang parameter @@ -122,12 +122,12 @@ class LSlang extends LSlog_staticLoggerClass { /** * Return list of available languages * - * @param[in] $encoding string|null Specify encoding for lang selection. If null, use self :: encoding value, + * @param string|null $lang Specify encoding for lang selection. If null, use self :: encoding value, * if false, do not filter on encoding, otherwise filter available lang for * specified encoding (optional, default: null) * @params[in] $with_encoding Return available lang list with encoding (optional, default: false) * - * @retval array List of available languages. + * @return array List of available languages. **/ public static function getLangList($encoding=null, $with_encoding=false) { if (is_null($encoding)) @@ -170,10 +170,10 @@ class LSlang extends LSlog_staticLoggerClass { /** * Return current language * - * @param[in] boolean If true, only return the two first characters of the language + * @param boolean $short If true, only return the two first characters of the language * (For instance, 'fr' for 'fr_FR') * - * @retval string The current language (ex: fr_FR, or fr if $short==true) + * @return string The current language (ex: fr_FR, or fr if $short==true) **/ public static function getLang($short=false) { if ($short) { @@ -185,7 +185,7 @@ class LSlang extends LSlog_staticLoggerClass { /** * Return current encoding * - * @retval string The current encoding (ex: UTF8) + * @return string The current encoding (ex: UTF8) **/ public static function getEncoding() { return self :: $encoding; @@ -194,10 +194,10 @@ class LSlang extends LSlog_staticLoggerClass { /** * Check a locale exists * - * @param[in] $lang string The language (ex: fr_FR) - * @param[in] $encoding string The encoding (ex: UTF8) + * @param string $lang The language (ex: fr_FR) + * @param string $lang The encoding (ex: UTF8) * - * @retval boolean True if the locale is available, False otherwise + * @return boolean True if the locale is available, False otherwise **/ public static function localeExist($lang, $encoding) { if ( !$lang && !$encoding ) { @@ -227,9 +227,9 @@ if (php_sapi_name() != "cli") return true; /** * CLI generate_lang_file command * - * @param[in] $command_args array Command arguments + * @param string $lang Command arguments * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ global $LSlang_cli_logger, $available_onlys, $available_withouts; @@ -955,12 +955,12 @@ function cli_generate_lang_file($command_args) { /** * Args autocompleter for CLI command generate_lang_file * - * @param[in] $comp_words array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $lang List of already typed words of the command + * @param string $lang The command word number to autocomplete + * @param string $lang The command word to autocomplete + * @param string $lang List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ function cli_generate_lang_file_args_autocompleter($comp_words, $comp_word_num, $comp_word, $opts) { global $available_withouts, $available_onlys; @@ -1039,9 +1039,9 @@ LScli :: add_command( /** * CLI generate_ldapsaisie_pot command * - * @param[in] $command_args array Command arguments + * @param string $lang Command arguments * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ function cli_generate_ldapsaisie_pot($command_args) { global $LSlang_cli_logger; diff --git a/src/includes/class/class.LSldap.php b/src/includes/class/class.LSldap.php index 3133af30..de1e49f5 100644 --- a/src/includes/class/class.LSldap.php +++ b/src/includes/class/class.LSldap.php @@ -41,9 +41,9 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $config array Configuration array as accepted by Net_LDAP2 + * @param array $config Configuration array as accepted by Net_LDAP2 * - * @retval void + * @return void */ public static function setConfig ($config) { self :: $config = $config; @@ -56,9 +56,9 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $config array LDAP configuration array in format of Net_LDAP2 + * @param array $config LDAP configuration array in format of Net_LDAP2 * - * @retval boolean true if connected, false instead + * @return boolean true if connected, false instead */ public static function connect($config = null) { if ($config) { @@ -78,12 +78,12 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string Bind DN - * @param[in] $pwd array Bind password - * @param[in] $config array LDAP configuration array in format of Net_LDAP2 + * @param array $config Bind DN + * @param array $config Bind password + * @param array $config LDAP configuration array in format of Net_LDAP2 * (optional, default: keep current) * - * @retval boolean true if connected, false instead + * @return boolean true if connected, false instead */ public static function reconnectAs($dn, $pwd, $config=null) { if ($config) { @@ -109,9 +109,9 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string Bind DN + * @param array $config Bind DN * - * @retval boolean true if authz proxy controle is set, false otherwise + * @return boolean true if authz proxy controle is set, false otherwise */ public static function setAuthzProxyControl($dn) { if (!self :: $cnx) { @@ -143,7 +143,7 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval void + * @return void */ public static function close() { self :: $cnx -> done(); @@ -156,13 +156,13 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $filter [required] string The search LDAP filter - * @param[in] $basedn string The base DN of the search - * @param[in] $params array Array to search parameters as accepted by Net_LDAP2::search() + * @param string $filterThe search LDAP filter + * @param array $config The base DN of the search + * @param array $config Array to search parameters as accepted by Net_LDAP2::search() * * @see Net_LDAP2::search() * - * @retval array Return an array of entries returned by the LDAP directory. Each element + * @return array Return an array of entries returned by the LDAP directory. Each element * of this array corresponded to one returned entry and is an array with * the following keys: * - dn: The DN of the entry @@ -207,13 +207,13 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $filter [required] string The search LDAP filter - * @param[in] $basedn string The base DN of the search - * @param[in] $params array Array to search parameters as accepted by Net_LDAP2::search() + * @param string $filterThe search LDAP filter + * @param array $config The base DN of the search + * @param array $config Array to search parameters as accepted by Net_LDAP2::search() * * @see Net_LDAP2::search() * - * @retval integer|null The number of matching entries on success, null otherwise + * @return integer|null The number of matching entries on success, null otherwise */ public static function getNumberResult($filter, $basedn=NULL, $params=array()) { if (empty($filter)) @@ -246,12 +246,12 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string DN de l'entré Ldap - * @param[in] $filter string LDAP filter string (optional, default: null == '(objectClass=*)') - * @param[in] $attrs array|null Array of requested attribute (optional, default: null == all attributes, excepted internal) - * @param[in] $include_internal boolean If true, internal attributes will be included (default: false) + * @param array $config DN de l'entré Ldap + * @param array $config LDAP filter string (optional, default: null == '(objectClass=*)') + * @param array|null $attrs Array of requested attribute (optional, default: null == all attributes, excepted internal) + * @param boolean $include_internal If true, internal attributes will be included (default: false) * - * @retval array|false Associative array of attributes values (with attribute name as key), or false on error + * @return array|false Associative array of attributes values (with attribute name as key), or false on error */ public static function getAttrs($dn, $filter=null, $attrs=null, $include_internal=false) { $infos = ldap_explode_dn($dn,0); @@ -274,9 +274,9 @@ class LSldap extends LSlog_staticLoggerClass { /** * Return a date string * - * @param[in] string LDAP date + * @param string $value LDAP date * - * @retval string Date YYYY/MM/DD HH:mm:ss + * @return string Date YYYY/MM/DD HH:mm:ss */ public static function parseDate($value) { $datetime = date_create_from_format('YmdHis.uO', $value); @@ -290,10 +290,10 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Emmanuel Saracco * - * @param[in] $attrs array Array of LDAP attributes - * @param[in] $name array Name of a attribute + * @param array $config Array of LDAP attributes + * @param array $config Name of a attribute * - * @retval boolean true if found + * @return boolean true if found */ public static function attrExists($attrs, $name) { return array_key_exists(strtolower($name), array_change_key_case($attrs)); @@ -306,11 +306,11 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Emmanuel Saracco * - * @param[in] $attrs array Array of LDAP attributes - * @param[in] $name array Name of a attribute - * @param[in] $multiple boolean true if we must return array + * @param array $config Array of LDAP attributes + * @param array $config Name of a attribute + * @param boolean $include_internal true if we must return array * - * @retval mixed Found value (or array of values) or null + * @return mixed Found value (or array of values) or null */ public static function getAttr($attrs, $name, $multiple = false) { $name = strtolower($name); @@ -327,10 +327,10 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $object_type string The object type - * @param[in] $dn string The DN of the LDAP entry + * @param array $config The object type + * @param array $config The DN of the LDAP entry * - * @retval ldapentry|array A Net_LDAP2_Entry object or an array if + * @return Net_LDAP2_Entry|array A Net_LDAP2_Entry object or an array if * it's a new entry: * Array ( * 'entry' => Net_LDAP2_Entry, @@ -366,10 +366,10 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string DN of the requested LDAP entry - * @param[in] $attrs array|null Array of requested attribute (optional, default: null == all attributes, excepted internal) + * @param array $config DN of the requested LDAP entry + * @param array|null $attrs Array of requested attribute (optional, default: null == all attributes, excepted internal) * - * @retval ldapentry|boolean A Net_LDAP2_Entry object or false if error occured + * @return Net_LDAP2_Entry|boolean A Net_LDAP2_Entry object or false if error occured */ public static function getLdapEntry($dn, $attrs=null) { $entry = self :: $cnx -> getEntry($dn, (is_array($attrs)?$attrs:array())); @@ -386,9 +386,9 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string DN of the LDAP entry to check + * @param array $config DN of the LDAP entry to check * - * @retval boolean True if entry exists, false otherwise + * @return boolean True if entry exists, false otherwise */ public static function exists($dn) { return is_a(self :: getLdapEntry($dn), 'Net_LDAP2_Entry'); @@ -397,11 +397,11 @@ class LSldap extends LSlog_staticLoggerClass { /** * Return a new Net_LDAP2_Entry object * - * @param[in] $dn string The DN of the object - * @param[in] $objectClass array Array of the object's object classes - * @param[in] $attrs array Array of object attributes values. Format: array('attr_name' => attr_value, ...) + * @param array $config The DN of the object + * @param array $config Array of the object's object classes + * @param array $config Array of object attributes values. Format: array('attr_name' => attr_value, ...) * - * @retval Net_LDAP2_Entry|False A Net_LDAP2_Entry object on success, False otherwise + * @return Net_LDAP2_Entry|False A Net_LDAP2_Entry object on success, False otherwise */ public static function getNewEntry($dn, $objectClass, $attrs, $add=false) { $newentry = Net_LDAP2_Entry::createFresh( @@ -429,11 +429,11 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $object_type string The object type - * @param[in] $dn string DN of the LDAP object - * @param[in] $change array Array of object attributes changes + * @param array $config The object type + * @param array $config DN of the LDAP object + * @param array $config Array of object attributes changes * - * @retval boolean True if object was updated, False otherwise. + * @return boolean True if object was updated, False otherwise. */ public static function update($object_type, $dn, $change) { self :: log_trace("update($object_type, $dn): change=".varDump($change)); @@ -551,7 +551,7 @@ class LSldap extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean True on bind success, False otherwise. + * @return boolean True on bind success, False otherwise. */ public static function checkBind($dn,$pwd) { $config = self :: $config; @@ -567,7 +567,7 @@ class LSldap extends LSlog_staticLoggerClass { /** * Return the status of the LDAP connection * - * @retval boolean True if connected on LDAP server, False otherwise + * @return boolean True if connected on LDAP server, False otherwise */ public static function isConnected() { return (self :: $cnx == NULL)?false:true; @@ -576,9 +576,9 @@ class LSldap extends LSlog_staticLoggerClass { /** * Drop an object in LDAP directory * - * @param[in] string The DN of the object to remove + * @param string $dn The DN of the object to remove * - * @retval boolean True if object was removed, False otherwise. + * @return boolean True if object was removed, False otherwise. */ public static function remove($dn) { $ret = self :: $cnx -> delete($dn,array('recursive' => true)); @@ -592,10 +592,10 @@ class LSldap extends LSlog_staticLoggerClass { /** * Move an entry in LDAP directory * - * @param[in] $old string The current object DN - * @param[in] $new string The new object DN + * @param array $config The current object DN + * @param array $config The new object DN * - * @retval boolean True if object was moved, False otherwise. + * @return boolean True if object was moved, False otherwise. */ public static function move($old, $new) { $ret = self :: $cnx -> move($old, $new); @@ -610,17 +610,17 @@ class LSldap extends LSlog_staticLoggerClass { /** * Combine LDAP Filters * - * @param[in] $op string The combine logical operator. May be "and", + * @param array $config The combine logical operator. May be "and", * "or", "not" or the subsequent logical * equivalents "&", "|", "!". - * @param[in] $filters array Array of LDAP filters (as string or + * @param array $config Array of LDAP filters (as string or * Net_LDAP2_Filter object) - * @param[in] $asStr boolean Set to true if you want to retreive + * @param boolean $include_internal Set to true if you want to retreive * combined filter as string instead of * as a Net_LDAP2_Filter object (optional, * default: false) * - * @retval Net_LDAP2_Filter | False The combined filter or False + * @return Net_LDAP2_Filter | False The combined filter or False **/ public static function combineFilters($op, $filters, $asStr=false) { if (is_array($filters) && !empty($filters)) { @@ -653,7 +653,7 @@ class LSldap extends LSlog_staticLoggerClass { * * @params string A LDAP filter as string * - * @retval boolean True only if the filter could be parsed + * @return boolean True only if the filter could be parsed **/ public static function isValidFilter($filter) { if (is_string($filter) && !empty($filter)) { @@ -672,13 +672,13 @@ class LSldap extends LSlog_staticLoggerClass { * * This method uses LDAP controls when possible (Net_LDAP2 does not). * - * @param[in] $object_type string The object type - * @param[in] $changed_attrs array Array of changed attributes - * @param[in] $dn string DN of the LDAP object + * @param array $config The object type + * @param array $config Array of changed attributes + * @param array $config DN of the LDAP object * * @author Emmanuel Saracco * - * @retval mixed New array of changed attributes or false + * @return mixed New array of changed attributes or false **/ private static function updateUserPassword($object_type, $changed_attrs, $dn) { if (self :: getConfig('version') < 3 || !function_exists('ldap_mod_replace_ext')) { @@ -725,7 +725,7 @@ class LSldap extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ private static function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, self :: $config); diff --git a/src/includes/class/class.LSldapObject.php b/src/includes/class/class.LSldapObject.php index 82c85e71..5ce6b256 100644 --- a/src/includes/class/class.LSldapObject.php +++ b/src/includes/class/class.LSldapObject.php @@ -56,7 +56,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si l'objet a été construit, false sinon. + * @return boolean true si l'objet a été construit, false sinon. */ public function __construct() { $this -> type_name = get_class($this); @@ -85,11 +85,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $dn string The object DN - * @param[in] $additional_filter string|Net_LDAP2_Filter|null A custom LDAP filter that LDAP object + * @param string $dn The object DN + * @param string|Net_LDAP2_Filter|null $additional_filter A custom LDAP filter that LDAP object * must respect to permit its data loading * - * @retval boolean True if object data loaded, false otherwise + * @return boolean True if object data loaded, false otherwise */ public function loadData($dn, $additional_filter=null) { $this -> dn = $dn; @@ -119,7 +119,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean true si la rechargement a réussi, false sinon. + * @return boolean true si la rechargement a réussi, false sinon. */ public function reloadData() { $data = LSldap :: getAttrs($this -> dn); @@ -135,7 +135,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval string Format d'affichage de l'objet. + * @return string Format d'affichage de l'objet. */ public function getDisplayNameFormat() { return $this -> getConfig('display_name_format'); @@ -149,11 +149,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $spe [optionnel] string Format d'affichage de l'objet - * @param[in] $full [optionnel] boolean True pour afficher en plus le + * @param string $spe string Format d'affichage de l'objet + * @param bool $full boolean True pour afficher en plus le * subDnName * - * @retval string Valeur descriptive d'affichage de l'objet + * @return string Valeur descriptive d'affichage de l'objet */ public function getDisplayName($spe=null, $full=false) { if (is_null($spe)) @@ -173,9 +173,9 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $format string Format de la chaine + * @param string $dn Format de la chaine * - * @retval string Valeur d'une chaine formatée + * @return string Valeur d'une chaine formatée */ public function getFData($format) { $format=getFData($format,$this,'getValue'); @@ -190,9 +190,9 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $format string Format de la chaine + * @param string $dn Format de la chaine * - * @retval string Valeur d'une chaine formatee + * @return string Valeur d'une chaine formatee */ public function getDisplayFData($format) { return getFData($format,$this,'getDisplayValue'); @@ -203,13 +203,13 @@ class LSldapObject extends LSlog_staticLoggerClass { * * This method create a LSform from the object and its attributes configurations. * - * @param[in] $idForm string Form identifier (required) - * @param[in] $load string DN of a similar object. If defined, attributes values of this object will be loaded in the form. - * @param[in] $api_mode boolean Enable API mode (defaut: false) + * @param string $dn Form identifier (required) + * @param string $dn DN of a similar object. If defined, attributes values of this object will be loaded in the form. + * @param boolean $api_mode Enable API mode (defaut: false) * * @author Benjamin Renard * - * @retval LSform The created LSform object + * @return LSform The created LSform object */ public function getForm($idForm, $load=NULL, $api_mode=false) { LSsession :: loadLSclass('LSform'); @@ -248,11 +248,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * This method create a LSform in view mode from the object and its attributes configurations. * - * @param[in] $api_mode boolean Enable API mode (defaut: false) + * @param boolean $api_mode Enable API mode (defaut: false) * * @author Benjamin Renard * - * @retval LSform The created LSform object + * @return LSform The created LSform object */ public function getView($api_mode=false) { LSsession :: loadLSclass('LSform'); @@ -269,11 +269,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * Cette méthode recharge les données d'un formulaire LSform. * - * @param[in] $idForm [required] Identifiant du formulaire a créer + * @param string $idForm Identifiant du formulaire a créer * * @author Benjamin Renard * - * @retval boolean true sile formulaire a été rafraichis, false sinon + * @return boolean true sile formulaire a été rafraichis, false sinon */ public function refreshForm($idForm) { $LSform = $this -> forms[$idForm][0]; @@ -291,14 +291,14 @@ class LSldapObject extends LSlog_staticLoggerClass { * This method just valid form ID, extract form data and call * _updateData() protected method. * - * @param[in] $idForm Form ID - * @param[in] $justCheck Boolean to enable just check mode + * @param string $idForm Form ID + * @param boolean $api_mode to enable just check mode * * @see _updateData() * * @author Benjamin Renard * - * @retval boolean true if object data was updated, false otherwise + * @return boolean true if object data was updated, false otherwise */ public function updateData($idForm=NULL, $justCheck=False) { if($idForm!=NULL) { @@ -333,13 +333,13 @@ class LSldapObject extends LSlog_staticLoggerClass { * This method implement the continuation and the end of the object data * udpate. * - * @param[in] $new_data Array of object data - * @param[in] $idForm Form ID - * @param[in] $justCheck Boolean to enable just check mode + * @param string $dn of object data + * @param string $idForm Form ID + * @param boolean $api_mode to enable just check mode * * @author Benjamin Renard * - * @retval boolean true if object data was updated, false otherwise + * @return boolean true if object data was updated, false otherwise * * @see updateData() * @see validateAttrsData() @@ -403,12 +403,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Validate data returned by form * - * @param[in] $idForm string The source LSform ID - * @param[in] $justCheck Boolean to enable just check mode (do not validate data using LDAP search) + * @param string $dn The source LSform ID + * @param boolean $api_mode to enable just check mode (do not validate data using LDAP search) * * @author Benjamin Renard * - * @retval boolean True if form data are valid, False otherwise + * @return boolean True if form data are valid, False otherwise */ public function validateAttrsData($idForm=null, $justCheck=False) { $retval = true; @@ -456,13 +456,13 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Validate one attribute's data returned by form * - * @param[in] $idForm string The source LSform ID - * @param[in] &$attr LSattribute The attribute to validate - * @param[in] $justCheck Boolean to enable just check mode (do not validate data using LDAP search) + * @param string $dn The source LSform ID + * @param LSattribute &$attr The attribute to validate + * @param boolean $api_mode to enable just check mode (do not validate data using LDAP search) * * @author Benjamin Renard * - * @retval boolean True if form data for this attribute are valid, False otherwise + * @return boolean True if form data for this attribute are valid, False otherwise */ public function validateAttrData(&$LSform, &$attr, $justCheck=false) { $retval = true; @@ -652,11 +652,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Submit changes made to LDAP directory * - * @param[in] $idForm string The source LSform ID + * @param string $dn The source LSform ID * * @author Benjamin Renard * - * @retval boolean True if changes are successfully push to LDAP directory, False otherwise + * @return boolean True if changes are successfully push to LDAP directory, False otherwise */ public function submitChange($idForm) { $submitData=array(); @@ -754,11 +754,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Retourne les informations issus d'un DN * - * @param[in] $dn Un DN. + * @param string $dn Un DN. * * @author Benjamin Renard * - * @retval array Tableau : + * @return array Tableau : * - [0] : le premier paramètre * - [1] : les paramètres suivants */ @@ -783,7 +783,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet + * @return Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet */ public function getObjectFilter() { return self :: _getObjectFilter($this -> type_name); @@ -794,7 +794,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet + * @return Net_LDAP2_Filter le filtre ldap correspondant au type de l'objet */ public static function _getObjectFilter($type) { $oc=LSconfig::get("LSobjects.$type.objectclass"); @@ -821,10 +821,10 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $pattern string Le mot clé recherché - * @param[in] $approx booléen Booléen activant ou non la recherche approximative + * @param string $dn Le mot clé recherché + * @param bool $approx booléen Booléen activant ou non la recherche approximative * - * @retval string le filtre ldap correspondant + * @return string le filtre ldap correspondant */ public function getPatternFilter($pattern=null,$approx=null) { if ($pattern) { @@ -845,11 +845,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $filter array (ou string) Filtre de recherche Ldap / Tableau de filtres de recherche - * @param[in] $basedn string DN de base pour la recherche - * @param[in] $params array Paramètres de recherche au format Net_LDAP2::search() + * @param string $dn (ou string) Filtre de recherche Ldap / Tableau de filtres de recherche + * @param string $dn DN de base pour la recherche + * @param string $dn Paramètres de recherche au format Net_LDAP2::search() * - * @retval array Tableau d'objets correspondant au resultat de la recherche + * @return array Tableau d'objets correspondant au resultat de la recherche */ public function listObjects($filter=NULL,$basedn=NULL,$params=array()) { if (!LSsession :: loadLSclass('LSsearch')) { @@ -880,12 +880,12 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $filter string Filtre de recherche Ldap - * @param[in] $basedn string DN de base pour la recherche - * @param[in] $params array Paramètres de recherche au format Net_LDAP2::search() - * @param[in] $displayFormat string Format d'affichage du nom des objets + * @param string $dn Filtre de recherche Ldap + * @param string $dn DN de base pour la recherche + * @param string $dn Paramètres de recherche au format Net_LDAP2::search() + * @param string $dn Format d'affichage du nom des objets * - * @retval array Tableau dn => name correspondant au resultat de la recherche + * @return array Tableau dn => name correspondant au resultat de la recherche */ public function listObjectsName($filter=NULL,$sbasedn=NULL,$sparams=array(),$displayFormat=false,$cache=true) { if (!LSsession :: loadLSclass('LSsearch')) { @@ -922,12 +922,12 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $name string Valeur de son RDN ou de la valeur pour composer le filtre - * @param[in] $basedn string Le DN de base de la recherche - * @param[in] $filter string Le filtre de recherche de l'objet - * @param[in] $params array Tableau de paramètres + * @param string $dn Valeur de son RDN ou de la valeur pour composer le filtre + * @param string $dn Le DN de base de la recherche + * @param string $dn Le filtre de recherche de l'objet + * @param string $dn Tableau de paramètres * - * @retval array Tableau d'objets correspondant au resultat de la recherche + * @return array Tableau d'objets correspondant au resultat de la recherche */ public function searchObject($name,$basedn=NULL,$filter=NULL,$params=NULL) { if (!$filter) { @@ -952,11 +952,11 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $val string The requested value - * @param[in] $first boolean If true and the result is an array, return only the first value (optional, default: false) - * @param[in] $default mixed Default value if unknown (optional, default: a space caracter = ' ') + * @param string $dn The requested value + * @param boolean $api_mode If true and the result is an array, return only the first value (optional, default: false) + * @param string $dn Default value if unknown (optional, default: a space caracter = ' ') * - * @retval mixed The requested value or $default if unknown + * @return mixed The requested value or $default if unknown */ public function getValue($val, $first=false, $default=' ') { $return = $default; @@ -989,9 +989,9 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @param[in] $val string Le nom de la valeur demandee + * @param string $dn Le nom de la valeur demandee * - * @retval mixed la valeur demandee ou ' ' si celle-ci est inconnue. + * @return mixed la valeur demandee ou ' ' si celle-ci est inconnue. */ public function getDisplayValue($val) { if(isset($this -> attrs[$val])){ @@ -1008,10 +1008,10 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Ajoute une valeur dans le tableau $this -> other_values * - * @param[in] $name string Le nom de la valeur - * @param[in] $value mixed La valeur + * @param string $dn Le nom de la valeur + * @param string $dn La valeur * - * @retval void + * @return void **/ public function registerOtherValue($name,$value) { $this -> other_values[$name]=$value; @@ -1022,7 +1022,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval array('dn' => 'display') + * @return array('dn' => 'display') */ public function getSelectArray($pattern=NULL,$topDn=NULL,$displayFormat=NULL,$approx=false,$cache=true,$filter=NULL,$sparams=array()) { $sparams['pattern']=$pattern; @@ -1037,7 +1037,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval string Le DN de l'objet + * @return string Le DN de l'objet */ public function getDn() { if($this -> dn) { @@ -1073,7 +1073,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval string Le container DN de l'objet + * @return string Le container DN de l'objet */ public function getContainerDn() { $topDn = LSsession :: getTopDn(); @@ -1108,7 +1108,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval string Le type de l'objet ($this -> type_name) + * @return string Le type de l'objet ($this -> type_name) */ public function getType() { return $this -> type_name; @@ -1119,7 +1119,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval array Array of LSprofiles of connected user's LSprofiles on this object + * @return array Array of LSprofiles of connected user's LSprofiles on this object */ public function whoami() { if (!$this -> _whoami) @@ -1130,11 +1130,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Retrieve object type translated label * - * @param[in] $type string|null The object type (optional, default: called class name) + * @param string|Net_LDAP2_Filter|null $additional_filter The object type (optional, default: called class name) * * @author Benjamin Renard * - * @retval string The translated object type label + * @return string The translated object type label */ public static function getLabel($type=null) { if (is_null($type)) @@ -1151,7 +1151,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean True si l'objet à été supprimé, false sinon + * @return boolean True si l'objet à été supprimé, false sinon */ public function remove() { if ($this -> fireEvent('before_delete')) { @@ -1173,7 +1173,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * * @author Benjamin Renard * - * @retval boolean True si l'objet est nouveau, false sinon + * @return boolean True si l'objet est nouveau, false sinon */ public function isNew() { return (!$this -> dn); @@ -1214,7 +1214,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Methode créant la liste des objets en relations avec l'objet courant et qui * la met en cache ($this -> _LSrelationsCache) * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function updateLSrelationsCache() { $this -> _LSrelationsCache=array(); @@ -1248,7 +1248,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function beforeRename() { // LSrelations @@ -1262,7 +1262,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function afterRename() { $error = 0; @@ -1293,7 +1293,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function beforeDelete() { $return = $this -> updateLSrelationsCache(); @@ -1314,7 +1314,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function afterDelete() { $error = 0; @@ -1354,7 +1354,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function afterCreate() { self :: log_debug('after'); @@ -1402,7 +1402,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Cette méthode n'est qu'un exemple et elle doit être certainement réécrite * pour les objets plus complexe. * - * @retval True en cas de cas ce succès, False sinon. + * @return True en cas de cas ce succès, False sinon. */ private function afterModify() { $error = 0; @@ -1418,13 +1418,13 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Retourne la valeur clef d'un objet en relation * - * @param[in] $object Un object de type $objectType - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValues La/les valeur(s) que doit/peut avoir l'attribut : + * @param LSldapObject $object Un object de type $objectType + * @param string $objectType Le type d'objet en relation + * @param array|string $attrValues La/les valeur(s) que doit/peut avoir l'attribut : * - soit le dn (par defaut) * - soit une des valeurs d'un attribut * - * @retval Mixed La valeur clef d'un objet en relation + * @return Mixed La valeur clef d'un objet en relation **/ public static function getObjectKeyValueInRelation($object, $objectType, $attrValues='dn') { if (!$objectType) { @@ -1458,14 +1458,14 @@ class LSldapObject extends LSlog_staticLoggerClass { * est établis par la présence de la valeur de référence à l'objet dans * l'attribut des objets de type $objectType. * - * @param[in] $object Un object de type $objectType - * @param[in] $attr L'attribut dans lequel l'objet doit apparaitre - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValues La/les valeur(s) que doit/peut avoir l'attribut : + * @param LSldapObject $object Un object de type $objectType + * @param string $attr L'attribut dans lequel l'objet doit apparaitre + * @param string $objectType Le type d'objet en relation + * @param array|string $attrValues La/les valeur(s) que doit/peut avoir l'attribut : * - soit le dn (par defaut) * - soit une des valeurs d'un attribut * - * @retval Array of $objectType Les objets en relations + * @return array of $objectType Les objets en relations **/ public function listObjectsInRelation($object, $attr, $objectType, $attrValues='dn') { if ((!$attr)||(!$objectType)) { @@ -1497,16 +1497,16 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Ajoute un objet en relation dans l'attribut $attr de $this * - * @param[in] $object Un objet de type $objectType à ajouter - * @param[in] $attr L'attribut dans lequel l'objet doit être ajouté - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValue La valeur que doit avoir l'attribut : + * @param LSldapObject $object Un objet de type $objectType à ajouter + * @param string $attr L'attribut dans lequel l'objet doit être ajouté + * @param string $objectType Le type d'objet en relation + * @param array|string $attrValue La valeur que doit avoir l'attribut : * - soit le dn (par defaut) * - soit la valeur [0] d'un attribut - * @param[in] $canEditFunction Le nom de la fonction pour vérifier que la + * @param string $canEditFunction Le nom de la fonction pour vérifier que la * relation avec l'objet est éditable par le user * - * @retval boolean true si l'objet à été ajouté, False sinon + * @return boolean true si l'objet à été ajouté, False sinon **/ public function addOneObjectInRelation($object,$attr,$objectType,$attrValue='dn',$canEditFunction=NULL) { if ((!$attr)||(!$objectType)) { @@ -1559,19 +1559,19 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Supprime un objet en relation dans l'attribut $attr de $this * - * @param[in] $object Un objet de type $objectType à supprimer - * @param[in] $attr L'attribut dans lequel l'objet doit être supprimé - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValue La valeur que doit avoir l'attribut : + * @param LSldapObject $object Un objet de type $objectType à supprimer + * @param string $attr L'attribut dans lequel l'objet doit être supprimé + * @param string $objectType Le type d'objet en relation + * @param string $attrValue La valeur que doit avoir l'attribut : * - soit le dn (par defaut) * - soit la valeur [0] d'un attribut - * @param[in] $canEditFunction Le nom de la fonction pour vérifier que la + * @param string $canEditFunction Le nom de la fonction pour vérifier que la * relation avec l'objet est éditable par le user - * @param[in] $attrValues L'ensembe des valeurs que peut avoir l'attribut avant mise à jour : + * @param array $attrValues L'ensembe des valeurs que peut avoir l'attribut avant mise à jour : * - soit le dn (par defaut) * - soit une des valeurs d'un attribut * - * @retval boolean true si l'objet à été supprimé, False sinon + * @return boolean true si l'objet à été supprimé, False sinon **/ public function deleteOneObjectInRelation($object,$attr,$objectType,$attrValue='dn',$canEditFunction=NULL,$attrValues=null) { if ((!$attr)||(!$objectType)) { @@ -1611,16 +1611,16 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Renome un objet en relation dans l'attribut $attr de $this * - * @param[in] $object Un objet de type $objectType à renomer - * @param[in] $oldValues array|string Le(s) ancienne(s) valeur(s possible(s) + * @param LSldapObject $object Un objet de type $objectType à renomer + * @param string|Net_LDAP2_Filter|null $additional_filter Le(s) ancienne(s) valeur(s possible(s) * faisant référence à l'objet - * @param[in] $attr L'attribut dans lequel l'objet doit être supprimé - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValue La valeur que doit avoir l'attribut : + * @param string $attr L'attribut dans lequel l'objet doit être supprimé + * @param string $objectType Le type d'objet en relation + * @param array $attrValue La valeur que doit avoir l'attribut : * - soit le dn (par defaut) * - soit la valeur [0] d'un attribut * - * @retval boolean True en cas de succès, False sinon + * @return boolean True en cas de succès, False sinon */ public function renameOneObjectInRelation($object, $oldValues, $attr, $objectType, $attrValue='dn') { if ((!$attr)||(!$objectType)) { @@ -1659,20 +1659,20 @@ class LSldapObject extends LSlog_staticLoggerClass { * de type $objectType en modifiant la valeur de leur attribut $attr des objets * en relation * - * @param[in] $object Mixed Un object (type : $this -> userObjectType) : l'utilisateur - * @param[in] $listDns Array(string) Un tableau des DNs des objets en relation - * @param[in] $attr L'attribut dans lequel l'utilisateur doit apparaitre - * @param[in] $objectType Le type d'objet en relation - * @param[in] $attrValue La valeur que doit avoir l'attribut : + * @param string $dn Un object (type : $this -> userObjectType) : l'utilisateur + * @param array[string] $listDns Un tableau des DNs des objets en relation + * @param string $attr L'attribut dans lequel l'utilisateur doit apparaitre + * @param string $objectType Le type d'objet en relation + * @param string $attrValue La valeur que doit avoir l'attribut : * - soit le dn (par defaut) * - soit la valeur [0] d'un attribut - * @param[in] $canEditFunction Le nom de la fonction pour vérifier que la + * @param string $canEditFunction Le nom de la fonction pour vérifier que la * relation avec l'objet est éditable par le user - * @param[in] $attrValues L'ensembe des valeurs que peut avoir l'attribut avant mise à jour : + * @param array|string $attrValues L'ensembe des valeurs que peut avoir l'attribut avant mise à jour : * - soit le dn (par defaut) * - soit une des valeurs d'un attribut * - * @retval boolean true si tout c'est bien passé, False sinon + * @return boolean true si tout c'est bien passé, False sinon **/ public function updateObjectsInRelation($object,$listDns,$attr,$objectType,$attrValue='dn',$canEditFunction=NULL,$attrValues=null) { if ((!$attr)||(!$objectType)) { @@ -1718,12 +1718,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Ajouter une action lors d'un événement * - * @param[in] $event string Le nom de l'événement - * @param[in] $fct string Le nom de la fonction à exectuer - * @param[in] $param mixed Paramètre pour le lancement de la fonction - * @param[in] $class Nom de la classe possèdant la méthode $fct à executer + * @param string $dn Le nom de l'événement + * @param string $dn Le nom de la fonction à exectuer + * @param string $dn Paramètre pour le lancement de la fonction + * @param string $class Nom de la classe possèdant la méthode $fct à executer * - * @retval void + * @return void */ public function addEvent($event,$fct,$param=NULL,$class=NULL) { $this -> _events[$event][] = array( @@ -1736,12 +1736,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Ajouter une action sur un objet lors d'un événement * - * @param[in] $event string Le nom de l'événement - * @param[in] $obj object L'objet dont la méthode doit être executé - * @param[in] $meth string Le nom de la méthode - * @param[in] $param mixed Paramètre d'execution de la méthode + * @param string $dn Le nom de l'événement + * @param object $obj L'objet dont la méthode doit être executé + * @param string $dn Le nom de la méthode + * @param string $dn Paramètre d'execution de la méthode * - * @retval void + * @return void */ public function addObjectEvent($event,&$obj,$meth,$param=NULL) { $this -> _objectEvents[$event][] = array( @@ -1754,9 +1754,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Lance les actions à executer lors d'un événement * - * @param[in] $event string Le nom de l'événement + * @param string $dn Le nom de l'événement * - * @retval boolean True si tout c'est bien passé, false sinon + * @return boolean True si tout c'est bien passé, false sinon */ public function fireEvent($event) { self :: log_debug(strval($this)." -> fireEvent($event)"); @@ -1858,9 +1858,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Lance les actions à executer lors d'un événement sur l'objet lui-même * - * @param[in] $event string Le nom de l'événement + * @param string $dn Le nom de l'événement * - * @retval boolean True si tout c'est bien passé, false sinon + * @return boolean True si tout c'est bien passé, false sinon **/ public function fireObjectEvent($event) { switch($event) { @@ -1891,9 +1891,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Access to infos of the object * - * @param[in] $key string The name of the value + * @param string $dn The name of the value * - * @retval mixed The value + * @return mixed The value **/ public function __get($key) { if ($key=='subDnValue') { @@ -1928,7 +1928,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Check if object type have a specified attribute * - * @param[in] $attr_name string The attribute name + * @param string $dn The attribute name * * @teval boolean True if object type have a attribute of this name, False otherwise */ @@ -1939,7 +1939,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * List IOformats of this object type * - * @retval mixed Array of valid IOformats of this object type + * @return mixed Array of valid IOformats of this object type **/ public function listValidIOformats() { $ret = array(); @@ -1955,9 +1955,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Check if an IOformat is valid for this object type * - * @param[in] $f string The IOformat name to check + * @param string $dn The IOformat name to check * - * @retval boolean True if it's a valid IOformat, false otherwise + * @return boolean True if it's a valid IOformat, false otherwise **/ public function isValidIOformat($f) { return is_array($this -> getConfig("ioFormat.$f")); @@ -1970,7 +1970,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> config); @@ -1979,7 +1979,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Allow conversion of LdapObject to string * - * @retval string The string representation of the LdapObject + * @return string The string representation of the LdapObject */ public function __toString() { return $this -> toString(true); @@ -1988,9 +1988,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Return string representation of the object * - * @param[in] $enclosed boolean If true, result will be enclosed using "< >" (optional, default: true) + * @param boolean $api_mode If true, result will be enclosed using "< >" (optional, default: true) * - * @retval string The string representation of the LdapObject + * @return string The string representation of the LdapObject */ public function toString($enclosed=true) { $str = "LdapObject ".$this -> getType(); @@ -2013,14 +2013,14 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI show command * - * @param[in] $command_args array Command arguments : + * @param string $dn Command arguments : * - Positional arguments : * - LSobject type * - object DN * - Optional arguments : * - -r|--raw-values : show raw values (instead of display ones) * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_show($command_args) { $objType = null; @@ -2067,12 +2067,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI show search * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_show_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-r', '--raw-values', '-j', '--json', '-p', '--pretty')); @@ -2121,9 +2121,9 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI helper to show the object info * - * @param[in] $raw_values bool Show attributes raw values (instead of display ones) + * @param string $dn Show attributes raw values (instead of display ones) * - * @retval void + * @return void **/ public function _cli_show($raw_values=false) { echo $this -> type_name." (".($this -> dn?$this -> dn:'new').") :\n"; @@ -2170,11 +2170,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI helper to show the attribute * - * @param[in] $attr_name string The attribute name - * @param[in] $raw_values bool Show attributes raw values (instead of display ones) - * @param[in] $prefix string Prefix for each line displayed (optional, default: no prefix) + * @param string $dn The attribute name + * @param string $dn Show attributes raw values (instead of display ones) + * @param string $dn Prefix for each line displayed (optional, default: no prefix) * - * @retval string The formated attribute message + * @return string The formated attribute message **/ private function _cli_show_attr($attr_name, $raw_values=false, $prefix="") { if (!isset($this -> attrs[$attr_name])) @@ -2186,11 +2186,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI helper to show the attribute values * - * @param[in] $attr_name string The attribute name - * @param[in] $values array Attribute values - * @param[in] $prefix string Prefix for each line displayed (optional, default: no prefix) + * @param string $dn The attribute name + * @param string $dn Attribute values + * @param string $dn Prefix for each line displayed (optional, default: no prefix) * - * @retval string The formated attribute values message + * @return string The formated attribute values message **/ private function _cli_show_attr_values($attr_name, $values, $prefix="") { $return = "$prefix - ".$this -> attrs[$attr_name]->getLabel()." ($attr_name) :"; @@ -2211,11 +2211,11 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI helper to show the attributes values * - * @param[in] $attrs_values attrs The attributes values - * @param[in] $label string|null The label text to show before attributes values - * @param[in] $prefix string Prefix for each line displayed (optional, default: no prefix) + * @param array $attrs_values attrs The attributes values + * @param string|Net_LDAP2_Filter|null $additional_filter The label text to show before attributes values + * @param string $dn Prefix for each line displayed (optional, default: no prefix) * - * @retval string The formated attributes values message + * @return string The formated attributes values message **/ private function _cli_show_attrs_values($attrs_values, $label=null, $prefix="") { $return = ""; @@ -2230,10 +2230,10 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI helper to export the object info as JSON * - * @param[in] $raw_values bool Export attributes raw values (instead of display ones) - * @param[in] $pretty bool Prettify JSON export + * @param string $dn Export attributes raw values (instead of display ones) + * @param string $dn Prettify JSON export * - * @retval void + * @return void **/ private function _cli_json_export($raw_values=false, $pretty=false) { $export = array( @@ -2293,14 +2293,14 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI remove command * - * @param[in] $command_args array Command arguments : + * @param string $dn Command arguments : * - Positional arguments : * - LSobject type * - object DN * - Optional arguments : * - -N|--no-confirm : Do not ask for confirmation * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_remove($command_args) { $objType = null; @@ -2349,12 +2349,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI remove command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_remove_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-N', '--no-confirm')); @@ -2405,12 +2405,12 @@ class LSldapObject extends LSlog_staticLoggerClass { * * attr=value1|value2 * - * @param[in] $obj LSldapObject The LDAP object - * @param[in] &$attrs_values array The reference of the array that store attributes values - * @param[in] $command_arg string The command argument to parse - * @param[in] $delimiter string The delimiter of multiple-value attribute (optional, default: '|') + * @param LSattribute &$attr The LDAP object + * @param array &$attrs_values The reference of the array that store attributes values + * @param string $dn The command argument to parse + * @param string $dn The delimiter of multiple-value attribute (optional, default: '|') * - * @retval boolean True if attribute values successfully parsed, False otherwise + * @return boolean True if attribute values successfully parsed, False otherwise **/ function _cli_parse_attr_values($obj, &$attrs_values, $command_arg, $delimiter='|') { $arg_parts = explode('=', $command_arg); @@ -2435,7 +2435,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI create command * - * @param[in] $command_args array Command arguments : + * @param string $dn Command arguments : * - Positional arguments : * - LSobject type * - object DN @@ -2449,7 +2449,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Note: for multiple-values attributes, you also could specify attribute and value * multiple time, for instance : attr1=value1 attr1=value2 * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_create($command_args) { $objType = $obj = null; @@ -2536,12 +2536,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI create command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_create_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-j', '--just-try', '-D', '--delimiter', '-N', '--no-confirm')); @@ -2600,7 +2600,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI modify command * - * @param[in] $command_args array Command arguments : + * @param string $dn Command arguments : * - Positional arguments : * - LSobject type * - object DN @@ -2613,7 +2613,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * Note: for multiple-values attributes, you also could specify attribute and value * multiple time, for instance : attr1=value1 attr1=value2 * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_modify($command_args) { $objType = $obj = null; @@ -2705,12 +2705,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI modify command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_modify_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-j', '--just-try', '-D', '--delimiter', '-N', '--no-confirm')); @@ -2785,7 +2785,7 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * CLI relation command * - * @param[in] $command_args array Command arguments : + * @param string $dn Command arguments : * - Positional arguments : * - LSobject type * - object DN @@ -2794,7 +2794,7 @@ class LSldapObject extends LSlog_staticLoggerClass { * - -a|--add : Add related object (specified by DN) * - -r|--remove : Remove related object (specified by DN) * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_relation($command_args) { $objType = null; @@ -2917,12 +2917,12 @@ class LSldapObject extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI relation command * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $dn List of already typed words of the command + * @param string $dn The command word number to autocomplete + * @param string $dn The command word to autocomplete + * @param string $dn List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_relation_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $opts = array_merge($opts, array ('-a', '--add', '-r', '--remove')); @@ -3045,9 +3045,9 @@ class LSldapObject extends LSlog_staticLoggerClass { * A LSobjet type name must only contain letter, digits or dash or * underscore. * - * @param[in] $name string The LSobject type name to check + * @param string $dn The LSobject type name to check * - * @retval boolean True is type name is valid, False otherwise + * @return boolean True is type name is valid, False otherwise */ public static function isValidTypeName($name) { if (preg_match('/^[a-zA-Z0-9\_\-]+$/', $name)) diff --git a/src/includes/class/class.LSlog.php b/src/includes/class/class.LSlog.php index d7e7837a..b14a36f4 100644 --- a/src/includes/class/class.LSlog.php +++ b/src/includes/class/class.LSlog.php @@ -60,7 +60,7 @@ class LSlog { /** * Start/initialize logging * - * @retval bool True on success, False otherwise + * @return bool True on success, False otherwise **/ public static function start() { // Load configuration @@ -98,10 +98,10 @@ class LSlog { /** * Add handler * - * @param[in] $handler string The handler name - * @param[in] $handler_config array The handler configuration (optional) + * @param string $handler The handler name + * @param array $handler_config The handler configuration (optional) * - * @retval boolean True if handler added, false otherwise + * @return boolean True if handler added, false otherwise **/ public static function add_handler($handler, $handler_config = array()) { if (!LSconfig :: get('enabled', true, 'bool', $handler_config)) @@ -126,9 +126,9 @@ class LSlog { /** * Enable console handler (if not already enabled) * - * @param[in] $level string|null The log level of the console handler + * @param string|null $level The log level of the console handler * - * @retval boolean True if log on console enabled, false otherwise + * @return boolean True if log on console enabled, false otherwise **/ public static function logOnConsole($level=null) { for ($i=0; $i < count(self :: $handlers); $i++) { @@ -144,7 +144,7 @@ class LSlog { /** * Disable console handler (if already enabled) * - * @retval void + * @return void **/ public static function disableLogOnConsole() { for ($i=0; $i < count(self :: $handlers); $i++) { @@ -158,9 +158,9 @@ class LSlog { /** * Set log level * - * @param[in] $level string|null The log level (optional, default: from configuration or 'WARNING') + * @param string|null $level The log level (optional, default: from configuration or 'WARNING') * - * @retval boolean True if log level set, false otherwise + * @return boolean True if log level set, false otherwise **/ public static function setLevel($level=null) { if (!$level) { @@ -187,14 +187,14 @@ class LSlog { /** * Get a configuration variable value * - * @param[in] $var string The configuration variable name - * @param[in] $default mixed The default value to return if configuration variable + * @param string $var The configuration variable name + * @param mixed $default The default value to return if configuration variable * is not set (Default : null) - * @param[in] $cast string The type of expected value. The configuration variable + * @param string $cast The type of expected value. The configuration variable * value will be cast as this type. Could be : bool, int, * float or string. (Optional, default : raw value) * - * @retval mixed The configuration variable value + * @return mixed The configuration variable value **/ public static function getConfig($var, $default=null, $cast=null) { return LSconfig :: get($var, $default, $cast, ((isset($GLOBALS['LSlog']) && is_array($GLOBALS['LSlog']))?$GLOBALS['LSlog']:array())); @@ -203,11 +203,11 @@ class LSlog { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param string $level The message level + * @param string $message The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public static function logging($level, $message, $logger=null) { // Check LSlog is enabled @@ -251,10 +251,10 @@ class LSlog { /** * Check level against configured level * - * @param[in] $level string The level - * @param[in] $configured_level string|null The configured level (optional, default : self :: $level) + * @param string $level The level + * @param string|null $configured_level The configured level (optional, default : self :: $level) * - * @retval bool True if a message with this level have to be logged, False otherwise + * @return bool True if a message with this level have to be logged, False otherwise **/ public static function checkLevel($level, $configured_level=null) { if (is_null($configured_level) || !array_key_exists($configured_level, self :: $levels)) @@ -270,9 +270,9 @@ class LSlog { /** * Check if a log level exists * - * @param[in] $level string The level + * @param string $level The level * - * @retval bool True if the specified log level exists, False otherwise + * @return bool True if the specified log level exists, False otherwise **/ public static function checkLevelExists($level) { return array_key_exists($level, self :: $levels); @@ -285,7 +285,7 @@ class LSlog { /** * Generate current context backtrace * - * @retval string Current context backtrace + * @return string Current context backtrace **/ public static function get_debug_backtrace_context() { $traces = debug_backtrace(); @@ -315,12 +315,12 @@ class LSlog { * Could be used as PHP set_exception_handler callable * @see https://www.php.net/set_exception_handler * - * @param[in] $exception Exception The exception to log - * @param[in] $prefix string|null Custom message prefix (optional, default: "An exception occured :\n") - * @param[in] $fatal boolean Log exception as a fatal error (optional, default: true) - * @param[in] $logger string|null The logger name (optional, default: null) + * @param Exception $exceptionThe exception to log + * @param string|null $prefix Custom message prefix (optional, default: "An exception occured :\n") + * @param boolean $fatal Log exception as a fatal error (optional, default: true) + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public static function exception($exception, $prefix=null, $fatal=true, $logger=null) { $message = @@ -386,9 +386,9 @@ class LSlog { /** * Get logger for a specific name * - * @param[in] $name The logger name + * @param string $name The logger name * - * @retval LSlog_logger The logger + * @return LSlog_logger The logger **/ public static function &get_logger($name) { if (!LSsession :: loadLSclass('LSlog_logger')) @@ -409,9 +409,9 @@ class LSlog { /** * Log a message with level TRACE * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function trace($message) { self :: logging('TRACE', $message); @@ -420,9 +420,9 @@ class LSlog { /** * Log a message with level DEBUG * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function debug($message) { self :: logging('DEBUG', $message); @@ -431,9 +431,9 @@ class LSlog { /** * Log a message with level INFO * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function info($message) { self :: logging('INFO', $message); @@ -442,9 +442,9 @@ class LSlog { /** * Log a message with level WARNING * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function warning($message) { self :: logging('WARNING', $message); @@ -453,9 +453,9 @@ class LSlog { /** * Log a message with level ERROR * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function error($message) { self :: logging('ERROR', $message); @@ -464,9 +464,9 @@ class LSlog { /** * Log a message with level FATAL * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public static function fatal($message) { self :: logging('FATAL', $message); diff --git a/src/includes/class/class.LSlog_console.php b/src/includes/class/class.LSlog_console.php index 2d388933..5435962f 100644 --- a/src/includes/class/class.LSlog_console.php +++ b/src/includes/class/class.LSlog_console.php @@ -34,9 +34,9 @@ class LSlog_console extends LSlog_handler { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { parent :: __construct($config); @@ -49,11 +49,11 @@ class LSlog_console extends LSlog_handler { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { return fwrite( diff --git a/src/includes/class/class.LSlog_email.php b/src/includes/class/class.LSlog_email.php index 9b9d928a..06420c4d 100644 --- a/src/includes/class/class.LSlog_email.php +++ b/src/includes/class/class.LSlog_email.php @@ -36,9 +36,9 @@ class LSlog_email extends LSlog_handler { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { parent :: __construct($config); @@ -50,7 +50,7 @@ class LSlog_email extends LSlog_handler { /** * Return list of details for the string representation of the LSlog_email * - * @retval array List of details for the string representation of the LSlog_email + * @return array List of details for the string representation of the LSlog_email */ public function __toStringDetails() { return array_merge( @@ -62,11 +62,11 @@ class LSlog_email extends LSlog_handler { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { if ($this -> recipient) diff --git a/src/includes/class/class.LSlog_file.php b/src/includes/class/class.LSlog_file.php index f53f259d..41970ade 100644 --- a/src/includes/class/class.LSlog_file.php +++ b/src/includes/class/class.LSlog_file.php @@ -33,9 +33,9 @@ class LSlog_file extends LSlog_handler { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { parent :: __construct($config); @@ -50,7 +50,7 @@ class LSlog_file extends LSlog_handler { /** * Return list of details for the string representation of the LSlog_file * - * @retval array List of details for the string representation of the LSlog_file + * @return array List of details for the string representation of the LSlog_file */ public function __toStringDetails() { return array_merge( @@ -62,11 +62,11 @@ class LSlog_file extends LSlog_handler { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { return error_log( diff --git a/src/includes/class/class.LSlog_handler.php b/src/includes/class/class.LSlog_handler.php index 448e26d6..01570d32 100644 --- a/src/includes/class/class.LSlog_handler.php +++ b/src/includes/class/class.LSlog_handler.php @@ -52,9 +52,9 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { $this -> config = $config; @@ -70,7 +70,7 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Allow conversion of LSlog_handler to string * - * @retval string The string representation of the LSlog_handler + * @return string The string representation of the LSlog_handler */ public function __toString() { return "<".get_class($this)." ".implode(', ', $this -> __toStringDetails()).">"; @@ -79,7 +79,7 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Return list of details for the string representation of the LSlog_handler * - * @retval array List of details for the string representation of the LSlog_handler + * @return array List of details for the string representation of the LSlog_handler */ public function __toStringDetails() { return array( @@ -92,9 +92,9 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Get handler info * - * @param[in] $key string The info name + * @param array $config The info name * - * @retval mixed The info value + * @return mixed The info value **/ public function __get($key) { switch ($key) { @@ -122,7 +122,7 @@ class LSlog_handler extends LSlog_staticLoggerClass { * just omit this handler if system is incompatible. You have to * trigger it with this method if you want. * - * @retval bool True if system is compatible, False otherwise + * @return bool True if system is compatible, False otherwise **/ public function checkCompatibility() { return True; @@ -131,14 +131,14 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Get a configuration variable value * - * @param[in] $var string The configuration variable name - * @param[in] $default mixed The default value to return if configuration variable + * @param array $config The configuration variable name + * @param array $config The default value to return if configuration variable * is not set (Default : null) - * @param[in] $cast string The type of expected value. The configuration variable + * @param array $config The type of expected value. The configuration variable * value will be cast as this type. Could be : bool, int, * float or string. (Optional, default : raw value) * - * @retval mixed The configuration variable value + * @return mixed The configuration variable value **/ public function getConfig($var, $default=null, $cast=null) { return LSconfig :: get($var, $default, $cast, $this -> config); @@ -147,9 +147,9 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Set log level * - * @param[in] $level string The level + * @param array $config The level * - * @retval bool True if log level set, False otherwise + * @return bool True if log level set, False otherwise **/ public function setLevel($level) { if (!is_null($level) && !LSlog :: checkLevelExists($level)) { @@ -163,9 +163,9 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Check level against configured level * - * @param[in] $level string The level + * @param array $config The level * - * @retval bool True if a message with this level have to be logged, False otherwise + * @return bool True if a message with this level have to be logged, False otherwise **/ public function checkLevel($level) { return LSlog :: checkLevel($level, $this -> level); @@ -174,9 +174,9 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Check logger against configured loggers filters * - * @param[in] $logger string The logger + * @param array $config The logger * - * @retval bool True if message of this logger have to be logged, False otherwise + * @return bool True if message of this logger have to be logged, False otherwise **/ public function checkLogger($logger) { if (!$this -> loggers && !$this -> excluded_loggers) @@ -191,11 +191,11 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { return; @@ -204,11 +204,11 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Format a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval string The formated message to log + * @return string The formated message to log **/ protected function format($level, $message, $logger=null) { global $argv; @@ -230,7 +230,7 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Helper to retrieve current LDAP server name * - * @retval string Current LDAP server name + * @return string Current LDAP server name **/ private static function getLdapServerName() { if (LSsession :: $ldapServer) { @@ -245,7 +245,7 @@ class LSlog_handler extends LSlog_staticLoggerClass { /** * Helper to retrieve current authenticated user DN * - * @retval string Current authenticated user DN + * @return string Current authenticated user DN **/ private static function getAuthenticatedUserDN() { $auth_dn = LSsession :: getLSuserObjectDn(); diff --git a/src/includes/class/class.LSlog_logger.php b/src/includes/class/class.LSlog_logger.php index dc92dadc..320d817f 100644 --- a/src/includes/class/class.LSlog_logger.php +++ b/src/includes/class/class.LSlog_logger.php @@ -44,10 +44,10 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] $name string The logger name - * @param[in] $config array The handler configuration (optional, default: array()) + * @param string $name The logger name + * @param array $config The handler configuration (optional, default: array()) * - * @retval void + * @return void **/ public function __construct($name, $config=array()) { $this -> name = $name; @@ -59,7 +59,7 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Allow conversion of LSlog_logger to string * - * @retval string The string representation of the LSlog_logger + * @return string The string representation of the LSlog_logger */ public function __toString() { return "<".get_class($this)." ".$this -> name.">"; @@ -68,14 +68,14 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Get a configuration variable value * - * @param[in] $var string The configuration variable name - * @param[in] $default mixed The default value to return if configuration variable + * @param string $var The configuration variable name + * @param mixed $default The default value to return if configuration variable * is not set (Default : null) - * @param[in] $cast string The type of expected value. The configuration variable + * @param string $cast The type of expected value. The configuration variable * value will be cast as this type. Could be : bool, int, * float or string. (Optional, default : raw value) * - * @retval mixed The configuration variable value + * @return mixed The configuration variable value **/ public function getConfig($var, $default=null, $cast=null) { return LSconfig :: get($var, $default, $cast, $this -> config); @@ -84,9 +84,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Get logger info * - * @param[in] $key string The info name + * @param string $key The info name * - * @retval mixed The info value + * @return mixed The info value **/ public function __get($key) { switch ($key) { @@ -105,9 +105,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Check level against configured level * - * @param[in] $level string The level + * @param string $level The level * - * @retval bool True if a message with this level have to be logged, False otherwise + * @return bool True if a message with this level have to be logged, False otherwise **/ public function checkLevel($level) { // If no level configured, always log @@ -119,10 +119,10 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message + * @param string $level The message level + * @param string $message The message * - * @retval void + * @return void **/ public function logging($level, $message) { if (!$this -> enabled || !$this -> checkLevel($level)) @@ -137,9 +137,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level DEBUG * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function trace($message) { $this -> logging('TRACE', $message); @@ -148,9 +148,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level DEBUG * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function debug($message) { $this -> logging('DEBUG', $message); @@ -159,9 +159,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level INFO * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function info($message) { $this -> logging('INFO', $message); @@ -170,9 +170,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level WARNING * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function warning($message) { $this -> logging('WARNING', $message); @@ -181,9 +181,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level ERROR * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function error($message) { $this -> logging('ERROR', $message); @@ -192,9 +192,9 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log a message with level FATAL * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ public function fatal($message) { $this -> logging('FATAL', $message); @@ -203,11 +203,11 @@ class LSlog_logger extends LSlog_staticLoggerClass { /** * Log an exception * - * @param[in] $exception Exception The exception to log - * @param[in] $prefix string|null Custom message prefix (optional, see LSlog :: exception()) - * @param[in] $fatal boolean Log exception as a fatal error (optional, default: true) + * @param Exception $exceptionThe exception to log + * @param string|null $prefix Custom message prefix (optional, see LSlog :: exception()) + * @param boolean $fatal Log exception as a fatal error (optional, default: true) * - * @retval void + * @return void **/ public function exception($exception, $prefix=null, $fatal=true) { if (!$this -> enabled) diff --git a/src/includes/class/class.LSlog_staticLoggerClass.php b/src/includes/class/class.LSlog_staticLoggerClass.php index af519c6f..4f579c02 100644 --- a/src/includes/class/class.LSlog_staticLoggerClass.php +++ b/src/includes/class/class.LSlog_staticLoggerClass.php @@ -30,10 +30,10 @@ class LSlog_staticLoggerClass { /* * Log a message via class logger * - * @param[in] $level string The log level (see LSlog) - * @param[in] $message string The message to log + * @param string $level The log level (see LSlog) + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log($level, $message) { LSlog :: get_logger(get_called_class()) -> logging($level, $message); @@ -42,11 +42,11 @@ class LSlog_staticLoggerClass { /** * Log an exception via class logger * - * @param[in] $exception Exception The exception to log - * @param[in] $prefix string|null Custom message prefix (optional, see self :: log_exception()) - * @param[in] $fatal boolean Log exception as a fatal error (optional, default: true) + * @param Exception $exceptionThe exception to log + * @param string|null $prefix Custom message prefix (optional, see self :: log_exception()) + * @param boolean $fatal Log exception as a fatal error (optional, default: true) * - * @retval void + * @return void **/ protected static function log_exception($exception, $prefix=null, $fatal=true) { LSlog :: get_logger(get_called_class()) -> exception($exception, $prefix, $fatal); @@ -55,9 +55,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level TRACE * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_trace($message) { self :: log('TRACE', $message); @@ -66,9 +66,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level DEBUG * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_debug($message) { self :: log('DEBUG', $message); @@ -77,9 +77,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level INFO * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_info($message) { self :: log('INFO', $message); @@ -88,9 +88,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level WARNING * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_warning($message) { self :: log('WARNING', $message); @@ -99,9 +99,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level ERROR * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_error($message) { self :: log('ERROR', $message); @@ -110,9 +110,9 @@ class LSlog_staticLoggerClass { /** * Log a message with level FATAL * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_fatal($message) { self :: log('FATAL', $message); diff --git a/src/includes/class/class.LSlog_syslog.php b/src/includes/class/class.LSlog_syslog.php index a1b31016..23e6146b 100644 --- a/src/includes/class/class.LSlog_syslog.php +++ b/src/includes/class/class.LSlog_syslog.php @@ -52,9 +52,9 @@ class LSlog_syslog extends LSlog_handler { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { parent :: __construct($config); @@ -66,7 +66,7 @@ class LSlog_syslog extends LSlog_handler { /** * Return list of details for the string representation of the LSlog_email * - * @retval array List of details for the string representation of the LSlog_email + * @return array List of details for the string representation of the LSlog_email */ public function __toStringDetails() { return array_merge( @@ -78,7 +78,7 @@ class LSlog_syslog extends LSlog_handler { /** * Check system compatibility with this handler * - * @retval bool True if system is compatible, False otherwise + * @return bool True if system is compatible, False otherwise **/ public function checkCompatibility() { return function_exists('syslog'); @@ -87,11 +87,11 @@ class LSlog_syslog extends LSlog_handler { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { return syslog( @@ -103,9 +103,9 @@ class LSlog_syslog extends LSlog_handler { /** * Get syslog corresponding priority to a specific log level * - * @param[in] $level string The log level + * @param array $config The log level * - * @retval int Syslog corresponding priority + * @return int Syslog corresponding priority **/ private function level2priority($level) { if ($this -> priority && $level != $this -> priority) diff --git a/src/includes/class/class.LSlog_system.php b/src/includes/class/class.LSlog_system.php index d5506f27..e4589ecf 100644 --- a/src/includes/class/class.LSlog_system.php +++ b/src/includes/class/class.LSlog_system.php @@ -33,9 +33,9 @@ class LSlog_system extends LSlog_handler { /** * Constructor * - * @param[in] $config array The handler configuration + * @param array $config The handler configuration * - * @retval void + * @return void **/ public function __construct($config) { parent :: __construct($config); @@ -46,11 +46,11 @@ class LSlog_system extends LSlog_handler { /** * Log a message * - * @param[in] $level string The message level - * @param[in] $message string The message - * @param[in] $logger string|null The logger name (optional, default: null) + * @param array $config The message level + * @param array $config The message + * @param string|null $logger The logger name (optional, default: null) * - * @retval void + * @return void **/ public function logging($level, $message, $logger=null) { error_log( diff --git a/src/includes/class/class.LSmail.php b/src/includes/class/class.LSmail.php index 924c6ad0..fc5cf9bc 100644 --- a/src/includes/class/class.LSmail.php +++ b/src/includes/class/class.LSmail.php @@ -25,7 +25,7 @@ class LSmail { /* * Méthode chargeant les dépendances d'affichage * - * @retval void + * @return void */ public static function loadDependenciesDisplay() { if (LSsession :: loadLSclass('LSsmoothbox')) { diff --git a/src/includes/class/class.LSobjects.LSgroup.php b/src/includes/class/class.LSobjects.LSgroup.php index ef168f92..cc8acbe9 100644 --- a/src/includes/class/class.LSobjects.LSgroup.php +++ b/src/includes/class/class.LSobjects.LSgroup.php @@ -35,9 +35,9 @@ class LSgroup extends LSldapObject { /** * Retourne la valeur clef d'un membre * - * @param[in] $object Un object utilisateur + * @param LSldapObject $object Un object utilisateur * - * @retval Mixed La valeur clef d'un membre + * @return Mixed La valeur clef d'un membre **/ public function getMemberKeyValue($object) { return $this -> getObjectKeyValueInRelation($object,$this -> userObjectType,$this -> memberAttrValue); @@ -49,9 +49,9 @@ class LSgroup extends LSldapObject { * Retourne un tableau de LSgroup correspondant aux groupes * auxquels appartient un utilisateur * - * @param[in] $userObject Un object user (type : $this -> userObjectType) + * @param LSldapObject $userObject Un object user (type : $this -> userObjectType) * - * @retval Array of LSgroup Les groupes de l'utilisateur + * @return array[LSgroup] Les groupes de l'utilisateur **/ public function listUserGroups($userObject) { return $this -> listObjectsInRelation($userObject,$this -> memberAttr,$this -> userObjectType,$this -> memberAttrValue); @@ -60,9 +60,9 @@ class LSgroup extends LSldapObject { /** * Ajoute un utilisateur au groupe * - * @param[in] $object Un object user ($this -> userObjectType) : l'utilisateur à ajouter + * @param LSldapObject $object Un object user ($this -> userObjectType) : l'utilisateur à ajouter * - * @retval boolean true si l'utilisateur à été ajouté, False sinon + * @return boolean true si l'utilisateur à été ajouté, False sinon **/ public function addOneMember($object) { return $this -> addOneObjectInRelation($object,$this -> memberAttr, $this -> userObjectType,$this -> memberAttrValue,'canEditGroupRelation'); @@ -71,9 +71,9 @@ class LSgroup extends LSldapObject { /** * Supprime un utilisateur du groupe * - * @param[in] $object Un object (type : $this -> userObjectType) : l'utilisateur à supprimer + * @param LSldapObject $object Un object (type : $this -> userObjectType) : l'utilisateur à supprimer * - * @retval boolean true si l'utilisateur à été supprimé, False sinon + * @return boolean true si l'utilisateur à été supprimé, False sinon **/ public function deleteOneMember($object) { return $this -> deleteOneObjectInRelation($object,$this -> memberAttr,$this -> userObjectType,$this -> memberAttrValue,'canEditGroupRelation'); @@ -82,10 +82,10 @@ class LSgroup extends LSldapObject { /** * Renome un utilisateur du groupe * - * @param[in] $object Un object (type : $this -> userObjectType) : l'utilisateur à renomer - * @param[in] $oldDn string L'ancien DN de l'utilisateur + * @param LSldapObject $object Un object (type : $this -> userObjectType) : l'utilisateur à renomer + * @param string $oldDn L'ancien DN de l'utilisateur * - * @retval boolean True en cas de succès, False sinon + * @return boolean True en cas de succès, False sinon */ public function renameOneMember($object,$oldDn) { return $this -> renameOneObjectInRelation($object,$oldDn,$this -> memberAttr,$this -> userObjectType,$this -> memberAttrValue); @@ -94,10 +94,10 @@ class LSgroup extends LSldapObject { /** * Met à jour les groupes d'un utilisateur * - * @param[in] $object Mixed Un object (type : $this -> userObjectType) : l'utilisateur - * @param[in] $listDns Array(string) Un tableau des DNs des groupes de l'utilisateur + * @param Mixed $object Un object (type : $this -> userObjectType) : l'utilisateur + * @param array[string] $listDns Array(string) Un tableau des DNs des groupes de l'utilisateur * - * @retval boolean true si tout c'est bien passé, False sinon + * @return boolean true si tout c'est bien passé, False sinon **/ public function updateUserGroups($object,$listDns) { return $this -> updateObjectsInRelation($object,$listDns,$this -> memberAttr,$this -> userObjectType,$this -> memberAttrValue,'canEditGroupRelation'); @@ -106,7 +106,7 @@ class LSgroup extends LSldapObject { /** * Test si l'utilisateur peut d'editer la relation avec ce groupe * - * @retval boolean true si tout l'utilisateur peut éditer la relation, False sinon + * @return boolean true si tout l'utilisateur peut éditer la relation, False sinon **/ public function canEditGroupRelation($dn=NULL) { if (!$dn) { diff --git a/src/includes/class/class.LSrelation.php b/src/includes/class/class.LSrelation.php index e818ac79..6cae0dbf 100644 --- a/src/includes/class/class.LSrelation.php +++ b/src/includes/class/class.LSrelation.php @@ -40,10 +40,10 @@ class LSrelation extends LSlog_staticLoggerClass { * object. All non-static method are designed to manipulate this type * of relation of the object specified at constuct time. * - * @param[in] &$obj LSldapObject A reference to the LSldapObject + * @param LSldapObject &$obj A reference to the LSldapObject * @param [in] $relationName string The relation name * - * @retval void + * @return void */ public function __construct(&$obj, $relationName) { $this -> obj =& $obj; @@ -64,7 +64,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Allow conversion of LSrelation to string * - * @retval string The string representation of the LSrelation + * @return string The string representation of the LSrelation */ public function __toString() { return " name." on ".$this -> obj -> toString(false).">"; @@ -77,7 +77,7 @@ class LSrelation extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public function getConfig($param, $default=null, $cast=null) { // Check relation is correctly configured @@ -89,9 +89,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Get relation info * - * @param[in] $key string The info name + * @param string $key The info name * - * @retval mixed The info value + * @return mixed The info value */ public function __get($key) { switch ($key) { @@ -129,7 +129,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Check relation configuration * - * @retval boolean True if relation is properly configured, False otherwise + * @return boolean True if relation is properly configured, False otherwise */ public function checkConfig() { // Check LSobject parameter @@ -228,10 +228,10 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Check a relation exist * - * @param[in] $object_type string The object type - * @param[in] $relation_name string The relation name + * @param string $object_type The object type + * @param string $relation_name The relation name * - * @retval boolean True if relation exist, false otherwise + * @return boolean True if relation exist, false otherwise */ public static function exists($object_type, $relation_name) { if ($object_type && LSsession :: loadLSobject($object_type)) { @@ -243,7 +243,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Get relation name * - * @retval string The relation name + * @return string The relation name */ public function getName() { return $this -> name; @@ -252,7 +252,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Check if user can edit this relation * - * @retval boolean True if user can edit this relation, false otherwise + * @return boolean True if user can edit this relation, false otherwise */ public function canEdit() { return LSsession :: relationCanEdit($this -> obj -> getValue('dn'),$this -> obj -> getType(),$this -> name); @@ -261,7 +261,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Check if user can create a related object * - * @retval boolean True if user can create a related object, false otherwise + * @return boolean True if user can create a related object, false otherwise */ public function canCreate() { return LSsession :: canCreate($this -> LSobject); @@ -270,7 +270,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * List related objects * - * @retval array|false An array of related objects (LSldapObject), of false in case of error + * @return array|false An array of related objects (LSldapObject), of false in case of error */ public function listRelatedObjects() { // Check relation is correctly configured @@ -337,7 +337,7 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Get the value to store to created the relation with $this -> obj * - * @retval array List of value of the link attribute + * @return array List of value of the link attribute */ public function getRelatedKeyValue() { // Check relation is correctly configured @@ -403,9 +403,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Check if user can edit the relation with the specified object * - * @param[in] &$objRel LSldapObject A reference to the related object + * @param LSldapObject &$objRel A reference to the related object * - * @retval boolean True if user can edit the relation with the specified object, false otherwise + * @return boolean True if user can edit the relation with the specified object, false otherwise */ public function canEditRelationWithObject(&$objRel) { // Check relation is correctly configured @@ -455,9 +455,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Remove relation with the specified object * - * @param[in] &$objRel LSldapObject A reference to the related object + * @param LSldapObject &$objRel A reference to the related object * - * @retval boolean True if relation removed, false otherwise + * @return boolean True if relation removed, false otherwise */ public function removeRelationWithObject(&$objRel) { // Check relation is correctly configured @@ -504,10 +504,10 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Rename relation with the specified object * - * @param[in] &$objRel LSldapObject A reference to the related object - * @param[in] $oldKeyValue string The old key value of the relation + * @param LSldapObject &$objRel A reference to the related object + * @param string $oldKeyValue The old key value of the relation * - * @retval boolean True if relation rename, false otherwise + * @return boolean True if relation rename, false otherwise */ public function renameRelationWithObject(&$objRel, $oldKeyValue) { // Check relation is correctly configured @@ -557,9 +557,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Update relation with the specified DN objects list * - * @param[in] $listDns array Array of DN of the related objects + * @param array $listDns Array of DN of the related objects * - * @retval boolean True if relations updated, false otherwise + * @return boolean True if relations updated, false otherwise */ public function updateRelations($listDns) { // Check relation is correctly configured @@ -629,7 +629,7 @@ class LSrelation extends LSlog_staticLoggerClass { /* * Load display dependencies * - * @retval void + * @return void */ public static function loadDependenciesDisplay() { if (LSsession :: loadLSclass('LSselect')) { @@ -650,9 +650,9 @@ class LSrelation extends LSlog_staticLoggerClass { * * LSrelations information are provided to template by usind LSrelations variable. * - * @param[in] $object LSldapObject L'objet dont on cherche les LSrelations + * @param LSldapObject $object L'objet dont on cherche les LSrelations * - * @retval void + * @return void */ public static function displayInLSview($object) { if (!($object instanceof LSldapObject)) @@ -748,10 +748,10 @@ class LSrelation extends LSlog_staticLoggerClass { * Helper to check AJAX method call and instanciate corresponding * LSldapObject and LSrelation objects. * - * @param[in] &$data array Reference to AJAX returned data array - * @param[in] $additional_parameters array|string|null List of additional required parameter + * @param array &$data Reference to AJAX returned data array + * @param array|string|null $additional_parameters List of additional required parameter * - * @retval array|false Array with LSobject and LSrelation + * @return array|false Array with LSobject and LSrelation */ public static function _ajax_check_call(&$data, &$conf, &$object, &$relation, $additional_required_parameters=null) { $data['success'] = false; @@ -822,9 +822,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Init LSselect for a relation * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_initSelection(&$data) { $conf = null; @@ -874,9 +874,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Update related object from LSselect result * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_updateFromSelection(&$data) { $conf = null; @@ -938,9 +938,9 @@ class LSrelation extends LSlog_staticLoggerClass { /** * Remove related object specify by DN * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_deleteByDn(&$data) { $conf = null; diff --git a/src/includes/class/class.LSsearch.php b/src/includes/class/class.LSsearch.php index 0febfc8f..dc97429e 100644 --- a/src/includes/class/class.LSsearch.php +++ b/src/includes/class/class.LSsearch.php @@ -78,10 +78,10 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] $LSobject string The LdapObject type of search - * @param[in] $context string Context of search (LSrelation / LSldapObject/ ...) - * @param[in] $params array Parameters of search - * @param[in] $purgeParams boolean If params in session have to be purged + * @param string $LSobject The LdapObject type of search + * @param string $LSobject Context of search (LSrelation / LSldapObject/ ...) + * @param string $LSobject Parameters of search + * @param boolean $purgeParams If params in session have to be purged * **/ public function __construct($LSobject,$context,$params=null,$purgeParams=false) { @@ -117,7 +117,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Allow conversion of LSsearch to string * - * @retval string The string representation of the LSsearch + * @return string The string representation of the LSsearch */ public function __toString() { $search_params = $this -> formatSearchParams(); @@ -127,7 +127,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Load configuration from LSconfig * - * @retval void + * @return void */ private function loadConfig() { $this -> config = LSconfig::get("LSobjects.".$this -> LSobject.".LSsearch"); @@ -144,7 +144,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Load default search parameters from configuration * - * @retval boolean True on success or False + * @return boolean True on success or False */ private function loadDefaultParameters() { if (isset($this -> config['params']) && is_array($this -> config['params'])) { @@ -159,7 +159,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Load search parameters from session * - * @retval boolean True if params has been loaded from session or False + * @return boolean True if params has been loaded from session or False */ private function loadParamsFromSession() { if (isset($_SESSION['LSsession']['LSsearch'][$this -> LSobject]['params'][$this -> context]) && is_array($_SESSION['LSsession']['LSsearch'][$this -> LSobject]['params'][$this -> context])) { @@ -181,7 +181,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Save search parameters in session * - * @retval void + * @return void */ private function saveParamsInSession() { self :: log_debug('Save context params session '.$this -> context); @@ -201,9 +201,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Purge parameters in session * - * @param[in] $LSobject string The LSobject type + * @param string $LSobject The LSobject type * - * @retval void + * @return void */ public static function purgeParams($LSobject) { unset($_SESSION['LSsession']['LSsearch'][$LSobject]['params']); @@ -212,7 +212,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Purge cache * - * @retval void + * @return void */ public static function purgeCache($LSobject) { unset($_SESSION['LSsession']['LSsearch'][$LSobject]); @@ -221,7 +221,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Purge session * - * @retval void + * @return void */ private function purgeSession() { unset($_SESSION['LSsession']['LSsearch']); @@ -230,10 +230,10 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Define one search parameter * - * @param[in] $param string The parameter name - * @param[in] $value mixed The parameter value + * @param string $LSobject The parameter name + * @param string $LSobject The parameter value * - * @retval boolean True on success or False + * @return boolean True on success or False */ public function setParam($param,$value) { return $this -> setParams(array($param => $value)); @@ -242,9 +242,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Define search parameters * - * @param[in] $params array Parameters of search + * @param string $LSobject Parameters of search * - * @retval boolean True on success or False + * @return boolean True on success or False */ public function setParams($params) { $OK=true; @@ -548,7 +548,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Return true only if the form is submited * - * @retval boolean True only if the is submited + * @return boolean True only if the is submited **/ private function formIsSubmited() { return isset($_REQUEST['LSsearch_submit']); @@ -557,7 +557,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Define search parameters by reading request data ($_REQUEST) * - * @retval boolean True if all parameters found in request data are handled, False otherwise + * @return boolean True if all parameters found in request data are handled, False otherwise */ public function setParamsFromRequest() { $allowedParams = array( @@ -646,7 +646,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Toggle the sort direction * - * @retval void + * @return void **/ private function toggleSortDirection() { if ($this -> params['sortDirection']=="ASC") { @@ -660,9 +660,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Make a filter object with a pattern of search * - * @param[in] $pattern The pattern of search. If is null, the pattern in params will be used. + * @param string $pattern The pattern of search. If is null, the pattern in params will be used. * - * @retval mixed Net_LDAP2_Filter on success or False + * @return mixed Net_LDAP2_Filter on success or False */ public function getFilterFromPattern($pattern=NULL) { if ($pattern==NULL) { @@ -738,9 +738,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Check if search pattern is valid * - * @param[in] $pattern string The pattern + * @param string $LSobject The pattern * - * @retval boolean True if pattern is valid or False + * @return boolean True if pattern is valid or False **/ public function isValidPattern($pattern) { if (is_string($pattern) && $pattern!= "") { @@ -755,7 +755,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Check if cache is enabled * - * @retval boolean True if cache is enabled or False + * @return boolean True if cache is enabled or False **/ public function cacheIsEnabled() { if (isset($this -> config['cache'])) { @@ -773,9 +773,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Methode for parameters value access * - * @param[in] $key string The parameter name + * @param string $LSobject The parameter name * - * @retval mixed The parameter value or NULL + * @return mixed The parameter value or NULL **/ public function getParam($key) { if(in_array($key,array_keys($this -> params))) { @@ -790,7 +790,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Return hidden fileds to add in search form * - * @retval array The hield fields whith their values + * @return array The hield fields whith their values **/ public function getHiddenFieldForm() { return array ( @@ -803,7 +803,7 @@ class LSsearch extends LSlog_staticLoggerClass { * passed to Net_LDAP2 for the LDAP search. This array will be store in * $this -> _searchParams private variable. * - * @retval void + * @return void **/ private function generateSearchParams() { // Base @@ -935,7 +935,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Format search parameters for logging * - * @retval string|null Formated search parameters is defined, or null if not + * @return string|null Formated search parameters is defined, or null if not **/ private function formatSearchParams() { if (!$this -> _searchParams) @@ -960,7 +960,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Get search attributes * - * @retval array The attributes asked in this search + * @return array The attributes asked in this search **/ public function getAttributes() { if (!$this -> _searchParams) @@ -971,9 +971,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Run the search * - * @param[in] $cache boolean Define if the cache can be used + * @param boolean $purgeParams Define if the cache can be used * - * @retval boolean True on success or False + * @return boolean True on success or False */ public function run($cache=true) { $this -> generateSearchParams(); @@ -1038,10 +1038,10 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Return an hash corresponding to the parameters of the search * - * @param[in] $searchParams array An optional search params array - * @param[in] $onlyAccessible boolean An optional onlyAccessible boolean flag + * @param string $LSobject An optional search params array + * @param boolean $purgeParams An optional onlyAccessible boolean flag * - * @retval string The hash of the parameters of the search + * @return string The hash of the parameters of the search **/ public function getHash($searchParams=null, $onlyAccessible=null) { if (is_null($searchParams)) { @@ -1063,7 +1063,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Add the result of the search to cache of the session * - * @retval void + * @return void **/ public function addResultToCache() { if ($this -> cacheIsEnabled()) { @@ -1078,7 +1078,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Get the result of the search from cache of the session * - * @retval array | False The array of the result of the search or False + * @return array | False The array of the result of the search or False **/ private function getResultFromCache() { if ($this -> cacheIsEnabled()) { @@ -1097,9 +1097,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Get page informations to display * - * @param[in] $page integer The number of the page + * @param boolean $purgeParams The number of the page * - * @retval array The information of the page + * @return array The information of the page **/ public function getPage($page=1) { if (!LSsession::loadLSclass('LSsearchEntry')) { @@ -1147,7 +1147,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Get search entries * - * @retval array The entries + * @return array The entries **/ public function getSearchEntries() { if (!LSsession::loadLSclass('LSsearchEntry')) { @@ -1174,9 +1174,9 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Access to information of this object * - * @param[in] $key string The key of the info + * @param string $LSobject The key of the info * - * @retval mixed The info + * @return mixed The info **/ public function __get($key) { $params = array ( @@ -1275,10 +1275,10 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Function use with uasort to sort two entry * - * @param[in] $a array One line of result - * @param[in] $b array One line of result + * @param string $LSobject One line of result + * @param string $LSobject One line of result * - * @retval int Value for uasort + * @return int Value for uasort **/ private function _sortTwoEntry(&$a,&$b) { $sortBy = $this -> params['sortBy']; @@ -1305,7 +1305,7 @@ class LSsearch extends LSlog_staticLoggerClass { * * IT'S FUNCTION IS VERY IMPORTANT !!! * - * @retval void + * @return void **/ public function afterUsingResult() { $this -> addResultToCache(); @@ -1314,7 +1314,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Redirect user to object view if the search have only one result * - * @retval boolean True only if user have been redirected + * @return boolean True only if user have been redirected **/ public function redirectWhenOnlyOneResult() { if ($this -> total == 1 && $this -> result && self::formIsSubmited()) { @@ -1326,7 +1326,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Run the sort if it's enabled and if the result is not in the cache * - * @retval boolean True on success or false + * @return boolean True on success or false **/ private function doSort() { if (!$this -> sort) { @@ -1373,7 +1373,7 @@ class LSsearch extends LSlog_staticLoggerClass { * Returns the id of table rows in the result sorted according to criteria * defined in the parameters * - * @retval array The Table of id lines of results sorted + * @return array The Table of id lines of results sorted **/ public function getSortTable() { if (isset($this -> result['sort'][$this -> params['sortBy']][$this -> params['sortDirection']])) { @@ -1385,7 +1385,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * List LSsearchEntry objects * - * @retval Array DN associate with name + * @return array DN associate with name **/ public function listEntries() { if (!LSsession::loadLSclass('LSsearchEntry')) { @@ -1416,7 +1416,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * List objects name * - * @retval Array DN associate with name + * @return array DN associate with name **/ public function listObjectsName() { $entries = $this -> listEntries(); @@ -1431,7 +1431,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * List LSldapObjects * - * @retval Array of LSldapObjects + * @return array of LSldapObjects **/ public function listObjects() { $retval=array(); @@ -1453,7 +1453,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * List objects dn * - * @retval Array of DN + * @return array of DN **/ public function listObjectsDn() { $retval=array(); @@ -1474,7 +1474,7 @@ class LSsearch extends LSlog_staticLoggerClass { /** * CLI search command * - * @param[in] $command_args array Command arguments : + * @param string $LSobject Command arguments : * - Positional arguments : * - LSobject type * - patterns @@ -1495,7 +1495,7 @@ class LSsearch extends LSlog_staticLoggerClass { * - -e|--extra-columns : Display extra columns * - -p|--page : page number to show (starting by 1, default: first one) * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ public static function cli_search($command_args) { $objType = null; @@ -1716,12 +1716,12 @@ class LSsearch extends LSlog_staticLoggerClass { /** * Args autocompleter for CLI command search * - * @param[in] $command_args array List of already typed words of the command - * @param[in] $comp_word_num int The command word number to autocomplete - * @param[in] $comp_word string The command word to autocomplete - * @param[in] $opts array List of global available options + * @param string $LSobject List of already typed words of the command + * @param string $LSobject The command word number to autocomplete + * @param string $LSobject The command word to autocomplete + * @param string $LSobject List of global available options * - * @retval array List of available options for the word to autocomplete + * @return array List of available options for the word to autocomplete **/ public static function cli_search_args_autocompleter($command_args, $comp_word_num, $comp_word, $opts) { $command_opts = array ( diff --git a/src/includes/class/class.LSsearchEntry.php b/src/includes/class/class.LSsearchEntry.php index e1e729de..10f7e29d 100644 --- a/src/includes/class/class.LSsearchEntry.php +++ b/src/includes/class/class.LSsearchEntry.php @@ -59,9 +59,9 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Constructor * - * @param[in] $LSobject string The LdapObject type of search - * @param[in] $params array Parameters of search - * @param[in] $resultEntry array The data of the result entry + * @param string $LSobject The LdapObject type of search + * @param string $LSobject Parameters of search + * @param string $LSobject The data of the result entry * **/ public function __construct(&$LSsearch, $LSobject, $params, &$result, $id) { @@ -81,7 +81,7 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Allow conversion of LSsearchEntry to string * - * @retval string The string representation of the LSsearchEntry + * @return string The string representation of the LSsearchEntry */ public function __toString() { return $this -> LSsearch." -> dn." (ID #".$this -> id.")>"; @@ -90,9 +90,9 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Get text value of entry * - * @param[in] $key string The name of the value + * @param string $LSobject The name of the value * - * @retval mixed The value + * @return mixed The value **/ public function get($key) { if (in_array($key,array_keys($this -> attrs))) { @@ -112,10 +112,10 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Add value in array $this -> other_values * - * @param[in] $name string The value name - * @param[in] $value mixed The value + * @param string $LSobject The value name + * @param string $LSobject The value * - * @retval void + * @return void **/ public function registerOtherValue($name,$value) { $this -> other_values[$name]=$value; @@ -124,9 +124,9 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Get formated text value of entry * - * @param[in] $format string The format of the value + * @param string $LSobject The format of the value * - * @retval mixed The formated value + * @return mixed The formated value **/ public function getFData($format) { return getFData($format,$this,'get'); @@ -136,9 +136,9 @@ class LSsearchEntry extends LSlog_staticLoggerClass { /** * Access to infos of the entry * - * @param[in] $key string The name of the value + * @param string $LSobject The name of the value * - * @retval mixed The value + * @return mixed The value **/ public function __get($key) { if ($key=='displayName') { @@ -271,7 +271,7 @@ class LSsearchEntry extends LSlog_staticLoggerClass { * @param[] $default The default value (default : null) * @param[] $cast Cast resulting value in specific type (default : disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ function getConfig($param, $default=null, $cast=null) { return LSconfig :: get($param, $default, $cast, $this -> params); diff --git a/src/includes/class/class.LSselect.php b/src/includes/class/class.LSselect.php index 200af0d9..194dab7b 100644 --- a/src/includes/class/class.LSselect.php +++ b/src/includes/class/class.LSselect.php @@ -27,7 +27,7 @@ class LSselect extends LSlog_staticLoggerClass { /* * Méthode chargeant les dépendances d'affichage * - * @retval void + * @return void */ public static function loadDependenciesDisplay() { if (LSsession :: loadLSclass('LSsmoothbox')) { @@ -39,8 +39,8 @@ class LSselect extends LSlog_staticLoggerClass { /** * Init a LSobjects selection - * @param[in] $id string The LSselect ID - * @param[in] $LSobjects array Selectable LSobject types configuration. Must be an array + * @param string $id The LSselect ID + * @param array $LSobjects Selectable LSobject types configuration. Must be an array * with object type as key and configuration as value with the * following info: * - object_type: the LSobject type (same as key, required) @@ -48,9 +48,9 @@ class LSselect extends LSlog_staticLoggerClass { * - filter: LDAP filter string for selectable objects (optional, default: no filter) * - onlyAccessible: filter on only accessible objects (optional, default: false) * - editableAttr: attribute name of object that must be writable to the object be selectable (optional) - * @param[in] $multiple boolean True if this selection permit to select more than one object, False otherwise (optional, + * @param boolean $multiple True if this selection permit to select more than one object, False otherwise (optional, * default: false) - * @param[in] $current_selected_objects array|null Array of current selected objects (optional, see setSelectedObjects for format specification) + * @param array|null $current_selected_objects Array of current selected objects (optional, see setSelectedObjects for format specification) * @return void */ public static function init($id, $LSobjects, $multiple=false, $current_selected_objects=null) { @@ -69,9 +69,9 @@ class LSselect extends LSlog_staticLoggerClass { /** * Check a LSselect exist by ID * - * @param[in] $id string The LSselect ID + * @param string $id The LSselect ID * - * @retval boolean + * @return boolean */ public static function exists($id) { if (isset($_SESSION['LSselect']) && is_array($_SESSION['LSselect']) && @@ -89,7 +89,7 @@ class LSselect extends LSlog_staticLoggerClass { * @param[] $cast Cast string|null resulting value in specific type * (optional, default : null=disabled) * - * @retval mixed The configuration parameter value or default value if not set + * @return mixed The configuration parameter value or default value if not set **/ public static function getConfig($id, $key, $default=null, $cast=null) { if (!self :: exists($id)) @@ -100,9 +100,9 @@ class LSselect extends LSlog_staticLoggerClass { /** * Check if LSselect exist and is multiple * - * @param[in] $id string The LSselect ID + * @param string $id The LSselect ID * - * @retval boolean + * @return boolean */ public static function isMultiple($id) { return self :: getConfig($id, 'multiple', false, 'bool'); @@ -111,11 +111,11 @@ class LSselect extends LSlog_staticLoggerClass { /** * Get LSsearch object corresponding to the specified selection * - * @param[in] $id string The LSselect ID - * @param[in] $object_type string|null The object type of the search (optional, + * @param string $id The LSselect ID + * @param string|null $object_type The object type of the search (optional, * default: first one object type configured) * - * @retval LSsearch|false The LSsearch object, or false in case of error + * @return LSsearch|false The LSsearch object, or false in case of error */ public static function &getSearch($id, $object_type=null) { // Check parameters @@ -176,9 +176,9 @@ class LSselect extends LSlog_staticLoggerClass { /** * Get selectable object types * - * @param[in] $id string The LSselect ID + * @param string $id The LSselect ID * - * @retval array|false Array of selectable object types with name as key + * @return array|false Array of selectable object types with name as key * and label as value, or false if LSselect doesn't exists. */ public static function getSelectableObjectTypes($id) { @@ -194,9 +194,9 @@ class LSselect extends LSlog_staticLoggerClass { /** * Get selectable objects info * - * @param[in] $id string The LSselect ID + * @param string $id The LSselect ID * - * @retval array|false Array of selectable object info with objects's DN as key + * @return array|false Array of selectable object info with objects's DN as key * and array of object's info as value. Objects's info returned * currently contains only the object type (object_type). if * LSselect specified doesn't exists, this method return false. @@ -212,17 +212,17 @@ class LSselect extends LSlog_staticLoggerClass { /** * Set selectable objects info * - * @param[in] $id string The LSselect ID - * @param[in] $selected_objects array Array of selectable object info with objects's DN + * @param string $id The LSselect ID + * @param array $selected_objects Array of selectable object info with objects's DN * as key and array of object's info as value. Objects's * info currently contains only the object type (key=object_type). * - * @retval array|false Array of selectable object info with objects's DN as key + * @return array|false Array of selectable object info with objects's DN as key * and array of object's info as value. Objects's info returned * currently contains only the object type (object_type). if * LSselect specified doesn't exists, this method return false. * - * @retval void + * @return void */ public static function setSelectedObjects($id, $selected_objects) { if (!self :: exists($id)) @@ -247,11 +247,11 @@ class LSselect extends LSlog_staticLoggerClass { /** * Check if an object is selectable * - * @param[in] $id string The LSselect ID - * @param[in] $object_type string The object type - * @param[in] $object_dn string The object DN + * @param string $id The LSselect ID + * @param string $object_type The object type + * @param string $object_dn The object DN * - * @retval boolean True if object is selectable, false otherwise + * @return boolean True if object is selectable, false otherwise */ public static function checkObjectIsSelectable($id, $object_type, $object_dn) { if (!self :: exists($id)) { @@ -303,9 +303,9 @@ class LSselect extends LSlog_staticLoggerClass { * Data in answer: * - success: True if object added to selection, false otherwise * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_addSelectedObject(&$data) { $data['success'] = false; @@ -350,9 +350,9 @@ class LSselect extends LSlog_staticLoggerClass { * Data in answer: * - success: True if object added to selection, false otherwise * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_dropSelectedObject(&$data) { $data['success'] = false; @@ -388,9 +388,9 @@ class LSselect extends LSlog_staticLoggerClass { * * Data in answer: any * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_updateSelectedObjects(&$data) { if (isset($_REQUEST['LSselect_id']) && isset($_REQUEST['selected_objects']) ) { @@ -419,9 +419,9 @@ class LSselect extends LSlog_staticLoggerClass { * Data in answer: * - objects: The selected objects info (see getSelectedObjects for format) * - * @param[in] &$data Reference to returned data array + * @param array &$data Reference to returned data array * - * @retval void + * @return void */ public static function ajax_getSelectedObjects(&$data) { if (isset($_REQUEST['LSselect_id'])) { @@ -441,10 +441,10 @@ class LSselect extends LSlog_staticLoggerClass { /** * LSsearchEntry selectable customInfos method : check if object is selectable * - * @param[in] $obj LSsearchEntry The LSsearchEntry object - * @param[in] $id string The LSselect ID + * @param LSsearchEntry $obj The LSsearchEntry object + * @param string $id The LSselect ID * - * @retval boolean True if object is selectable, False otherwise + * @return boolean True if object is selectable, False otherwise */ public static function selectable($obj, $id) { $editableAttr = self :: getConfig($id, "LSobjects.".$obj->type.".editableAttr"); @@ -459,10 +459,10 @@ class LSselect extends LSlog_staticLoggerClass { /** * LSsearchEntry selected customInfos method : check if object is selected * - * @param[in] $obj LSsearchEntry The LSsearchEntry object - * @param[in] $id string The LSselect ID + * @param LSsearchEntry $obj The LSsearchEntry object + * @param string $id The LSselect ID * - * @retval boolean True if object is selected, False otherwise + * @return boolean True if object is selected, False otherwise */ public static function selected($obj, $id) { if (self :: exists($id) && diff --git a/src/includes/class/class.LSsession.php b/src/includes/class/class.LSsession.php index dc44f27a..4658e524 100644 --- a/src/includes/class/class.LSsession.php +++ b/src/includes/class/class.LSsession.php @@ -112,9 +112,9 @@ class LSsession { /** * Get session info by key * - * @param[in] $key string The info + * @param string $key The info * - * @retval mixed The info or null + * @return mixed The info or null */ public static function get($key) { switch($key) { @@ -149,17 +149,17 @@ class LSsession { /** * Include PHP file * - * @param[in] $file string The path to the file to include : + * @param string $key The path to the file to include : * - if $external == false : the path must be relative to LS_ROOT_DIR * - if $external == true : the path could be absolute or relative. If * relative, it will be treated with PHP include path. - * @param[in] $external boolean If true, file consided as external (optional, default: false) - * @param[in] $warn boolean If true, a warning will be log if file not found (optional, default: true) + * @param boolean $external If true, file consided as external (optional, default: false) + * @param boolean $external If true, a warning will be log if file not found (optional, default: true) * This warning will be emit using LSlog if it's already loaded or error_log() * otherwise. * @author Benjamin Renard * - * @retval boolean True if file is loaded, false otherwise + * @return boolean True if file is loaded, false otherwise */ public static function includeFile($file, $external=false, $warn=true) { $path = ($external?'':LS_ROOT_DIR."/").$file; @@ -199,7 +199,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval true si tout c'est bien passé, false sinon + * @return true si tout c'est bien passé, false sinon */ private static function startLSconfig() { if (self :: loadLSclass('LSconfig')) { @@ -216,7 +216,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval true si tout c'est bien passé, false sinon + * @return true si tout c'est bien passé, false sinon */ private static function startLSlog() { if (self :: loadLSclass('LSlog')) { @@ -230,10 +230,10 @@ class LSsession { /* * Log a message via class logger (of other method if LSlog is not loaded) * - * @param[in] $level string The log level (see LSlog) - * @param[in] $message string The message to log + * @param string $key The log level (see LSlog) + * @param string $key The message to log * - * @retval void + * @return void **/ protected static function log($level, $message) { if (class_exists('LSlog')) { @@ -257,11 +257,11 @@ class LSsession { /** * Log an exception via class logger * - * @param[in] $exception Exception The exception to log - * @param[in] $prefix string|null Custom message prefix (optional, see self :: log_exception()) - * @param[in] $fatal boolean Log exception as a fatal error (optional, default: true) + * @param Exception $exceptionThe exception to log + * @param string|null $prefix Custom message prefix (optional, see self :: log_exception()) + * @param boolean $external Log exception as a fatal error (optional, default: true) * - * @retval void + * @return void **/ protected static function log_exception($exception, $prefix=null, $fatal=true) { if (class_exists('LSlog')) { @@ -277,9 +277,9 @@ class LSsession { /** * Log a message with level TRACE * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_trace($message) { self :: log('TRACE', $message); @@ -288,9 +288,9 @@ class LSsession { /** * Log a message with level DEBUG * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_debug($message) { self :: log('DEBUG', $message); @@ -299,9 +299,9 @@ class LSsession { /** * Log a message with level INFO * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_info($message) { self :: log('INFO', $message); @@ -310,9 +310,9 @@ class LSsession { /** * Log a message with level WARNING * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_warning($message) { self :: log('WARNING', $message); @@ -321,9 +321,9 @@ class LSsession { /** * Log a message with level ERROR * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_error($message) { self :: log('ERROR', $message); @@ -332,9 +332,9 @@ class LSsession { /** * Log a message with level FATAL * - * @param[in] $message The message to log + * @param string $message The message to log * - * @retval void + * @return void **/ protected static function log_fatal($message) { self :: log('FATAL', $message); @@ -345,7 +345,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval True on success, false otherwise + * @return True on success, false otherwise */ private static function startLSurl() { if (self :: loadLSclass('LSurl') && self :: includeFile(LS_INCLUDE_DIR . "routes.php")) { @@ -359,7 +359,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval True on success, false otherwise + * @return True on success, false otherwise */ private static function startLStemplate() { if ( self :: loadLSclass('LStemplate') ) { @@ -394,7 +394,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval string The current topDn + * @return string The current topDn */ public static function getTopDn() { if (!is_null(self :: $topDn)) { @@ -410,7 +410,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval string The current rootDn + * @return string The current rootDn */ public static function getRootDn() { return self :: $ldapServer['ldap_config']['basedn']; @@ -421,7 +421,7 @@ class LSsession { * * @author Benjamin Renard getValue('dn'), $pwd); @@ -1528,7 +1528,7 @@ class LSsession { * * Define template information allowing to display login form. * - * @retval void + * @return void */ public static function displayLoginForm() { LStemplate :: assign('pagetitle', _('Connection')); @@ -1546,9 +1546,9 @@ class LSsession { * * Define template information allowing to display password recovery form. * - * @param[in] $infos array() Password recovery process state information + * @param array $infos Password recovery process state information * - * @retval void + * @return void */ public static function displayRecoverPasswordForm($recoveryPasswordInfos) { LStemplate :: assign('pagetitle', _('Recovery of your credentials')); @@ -1591,9 +1591,9 @@ class LSsession { * * Note: template files are normally store in templates directory. * - * @param[in] string The name of the template file + * @param string $template The name of the template file * - * @retval void + * @return void */ public static function setTemplate($template) { self :: $template = $template; @@ -1602,12 +1602,12 @@ class LSsession { /** * Add a JS script to load on page * - * @param[in] $file string The JS filename - * @param[in] $path string|null The sub-directory path that contain this file. + * @param string $key The JS filename + * @param string|null $prefix The sub-directory path that contain this file. * @deprecated * @see LStemplate :: addJSscript() * - * @retval void + * @return void */ public static function addJSscript($file, $path=NULL) { if ($path) @@ -1626,11 +1626,11 @@ class LSsession { /** * Add a library JS file to load on page * - * @param[in] $file string The JS filename + * @param string $key The JS filename * @deprecated * @see LStemplate :: addLibJSscript() * - * @retval void + * @return void */ public static function addLibJSscript($file) { LStemplate :: addLibJSscript($file); @@ -1647,12 +1647,12 @@ class LSsession { /** * Add Javascript configuration parameter * - * @param[in] $name string The name of the JS config paramenter - * @param[in] $val mixed The value of the JS config paramenter + * @param string $key The name of the JS config paramenter + * @param string $key The value of the JS config paramenter * @deprecated * @see LStemplate :: addJSconfigParam() * - * @retval void + * @return void */ public static function addJSconfigParam($name, $val) { LStemplate :: addJSconfigParam($name, $val); @@ -1670,12 +1670,12 @@ class LSsession { /** * Add a CSS file to load on page * - * @param[in] $file string The CSS filename - * @param[in] $path string|null The sub-directory path that contain this file. + * @param string $key The CSS filename + * @param string|null $prefix The sub-directory path that contain this file. * @deprecated * @see LStemplate :: addCssFile() * - * @retval void + * @return void */ public static function addCssFile($file, $path=NULL) { if ($path) @@ -1694,11 +1694,11 @@ class LSsession { /** * Add a library CSS file to load on page * - * @param[in] $file string The CSS filename + * @param string $key The CSS filename * @deprecated * @see LStemplate :: addLibCssFile() * - * @retval void + * @return void */ public static function addLibCssFile($file) { LStemplate :: addLibCssFile($file); @@ -1717,7 +1717,7 @@ class LSsession { * * Load dependencies of show the previously selected template file * - * @retval void + * @return void */ public static function displayTemplate() { if (self :: $api_mode) @@ -1792,9 +1792,9 @@ class LSsession { /** * Set Ajax display mode * - * @param[in] $val boolean True to enable Ajax display mode (optional, default: true) + * @param boolean $external True to enable Ajax display mode (optional, default: true) * - * @retval void + * @return void */ public static function setAjaxDisplay($val=true) { self :: $ajaxDisplay = (boolean)$val; @@ -1803,7 +1803,7 @@ class LSsession { /** * Check if Ajax display mode is enabled * - * @retval boolean True if Ajax display mode is enabled, False otherwise + * @return boolean True if Ajax display mode is enabled, False otherwise */ public static function getAjaxDisplay() { return (boolean)self :: $ajaxDisplay; @@ -1812,7 +1812,7 @@ class LSsession { /** * Show Ajax return * - * @retval void + * @return void */ public static function displayAjaxReturn($data=array(), $pretty=false) { // Adjust content-type @@ -1866,9 +1866,9 @@ class LSsession { /** * Set API mode * - * @param[in] $val boolean True to enable API mode (optional, default: true) + * @param boolean $external True to enable API mode (optional, default: true) * - * @retval void + * @return void */ public static function setApiMode($val=true) { self :: $api_mode = (boolean)$val; @@ -1878,10 +1878,10 @@ class LSsession { /** * Fetch builded template * - * @param[in] string $template The template file to build - * @param[in] array $variables Template variables to set before building + * @param string $template The template file to build + * @param string $template Template variables to set before building * - * @retval string The template builded HTML code + * @return string The template builded HTML code */ public static function fetchTemplate($template,$variables=array()) { foreach($variables as $name => $val) { @@ -1898,12 +1898,12 @@ class LSsession { * If an error is present in the filter definition array, an empty * array is returned. * - * @param[in] string $LSobject The default LSobject type - * @param[in] array $set Array of LSobjects - * @param[in] array $filter_def Definition of the search filter for reduction - * @param[in] string $basend Base DN for search, null by default + * @param string $template The default LSobject type + * @param string $template Array of LSobjects + * @param string $template Definition of the search filter for reduction + * @param string $template Base DN for search, null by default * - * @retval array The reduced array of LSobjects + * @return array The reduced array of LSobjects */ private static function reduceLdapSet($LSobject, $set, $filter_def, $basedn=null) { if (empty($set)) { @@ -1960,11 +1960,11 @@ class LSsession { * Regarding configuration, user profile on specific list on the specified * LSobject type will be loaded. * - * @param[in] string $profile The LSprofil - * @param[in] string $LSobject The LSobject type - * @param[in] string $LSobject The parameters to list of granted objects + * @param string $template The LSprofil + * @param string $template The LSobject type + * @param string $template The parameters to list of granted objects * - * @retval void + * @return void */ private static function loadLSprofilesLSobjects($profile, $LSobject, $listInfos) { if (! self :: loadLSclass('LSsearch')) { @@ -2005,7 +2005,7 @@ class LSsession { /** * Loading user's profiles * - * @retval boolean True on success, false otherwise + * @return boolean True on success, false otherwise **/ private static function loadLSprofiles() { if (!is_array(self :: $ldapServer['LSprofiles'])) { @@ -2118,7 +2118,7 @@ class LSsession { /** * Load user access rights to build interface menu * - * @retval void + * @return void */ private static function loadLSaccess() { $LSaccess=array(); @@ -2201,9 +2201,9 @@ class LSsession { /** * Get user access * - * @param[in] $topDn string Top DN (optional, default : current) + * @param string $key Top DN (optional, default : current) * - * @retval array User's access + * @return array User's access **/ public static function getLSaccess($topDn=null) { if (is_null($topDn)) $topDn = self :: getTopDn(); @@ -2216,7 +2216,7 @@ class LSsession { /** * Load user access to LSaddons views * - * @retval void + * @return void */ private static function loadLSaddonsViewsAccess() { $LSaddonsViewsAccess=array(); @@ -2240,10 +2240,10 @@ class LSsession { /** * Check if user is a specified profile on specified DN * - * @param[in] string $dn DN of the object to check - * @param[in] string $profile The profile + * @param string $template DN of the object to check + * @param string $template The profile * - * @retval boolean True if user is a specified profile on specified DN, false otherwise. + * @return boolean True if user is a specified profile on specified DN, false otherwise. */ public static function isLSprofile($dn,$profile) { if (is_array(self :: $LSprofiles[$profile])) { @@ -2262,10 +2262,10 @@ class LSsession { /** * Check if user is at least one of specified profiles on specified DN * - * @param[in] string $dn DN of the object to check - * @param[in] string $profiles The profiles list + * @param string $template DN of the object to check + * @param string $template The profiles list * - * @retval boolean True if user is at least one of specified profiles on specified DN, false otherwise. + * @return boolean True if user is at least one of specified profiles on specified DN, false otherwise. */ public static function isLSprofiles($dn,$profiles) { foreach ($profiles as $profile) { @@ -2278,9 +2278,9 @@ class LSsession { /** * Return connected user's LSprofiles on a specific object. * - * @param[in] string The object's DN + * @param string $dn The object's DN * - * @retval array Array of LSprofiles of the connected user on the specified object + * @return array Array of LSprofiles of the connected user on the specified object */ public static function whoami($dn) { $retval = array('user'); @@ -2308,12 +2308,12 @@ class LSsession { /** * Return user access right to access to specify LSobject * - * @param[in] $LSobject string The LSobject type - * @param[in] $dn string The LSobject DN (optional, default: the container_dn of the LSobject type) - * @param[in] $right string The requested access right ('r' or 'w', optional, default: 'r' or 'w') - * @param[in] $attr string The requested attribute name (optional, default: any) + * @param string $key The LSobject type + * @param string $key The LSobject DN (optional, default: the container_dn of the LSobject type) + * @param string $key The requested access right ('r' or 'w', optional, default: 'r' or 'w') + * @param string $key The requested attribute name (optional, default: any) * - * @retval boolean True is user can access to the specify LSobject, False otherwise + * @return boolean True is user can access to the specify LSobject, False otherwise */ public static function canAccess($LSobject, $dn=NULL, $right=NULL, $attr=NULL) { if (!self :: loadLSobject($LSobject)) { @@ -2427,11 +2427,11 @@ class LSsession { /** * Check if user can edit a specified object * - * @param[in] string $LSobject The LSobject type - * @param[in] string $dn The DN of the object (optional, default: the container_dn of the LSobject type) - * @param[in] string $attr The attribue name of attribute to check (optional, default: any attributes) + * @param string $template The LSobject type + * @param string $template The DN of the object (optional, default: the container_dn of the LSobject type) + * @param string $template The attribue name of attribute to check (optional, default: any attributes) * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canEdit($LSobject, $dn=NULL, $attr=NULL) { return self :: canAccess($LSobject, $dn, 'w', $attr); @@ -2440,10 +2440,10 @@ class LSsession { /** * Check if user can remove a specified object * - * @param[in] string $LSobject The LSobject type - * @param[in] string $dn The DN of the object (optional, default: the container_dn of the LSobject type) + * @param string $template The LSobject type + * @param string $template The DN of the object (optional, default: the container_dn of the LSobject type) * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canRemove($LSobject, $dn) { return self :: canAccess($LSobject, $dn, 'w', 'rdn'); @@ -2452,9 +2452,9 @@ class LSsession { /** * Check if user can create a specific object type * - * @param[in] string $LSobject The LSobject type + * @param string $template The LSobject type * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canCreate($LSobject) { if (!self :: loadLSobject($LSobject)) { @@ -2469,11 +2469,11 @@ class LSsession { /** * Check user right to compute the result of a LSformat * - * @param[in] $LSformat string The LSformat string to check - * @param[in] $LSobject string The LSobject type - * @param[in] $dn string The LSobject DN (optional, default: the container_dn of the LSobject type) + * @param string $key The LSformat string to check + * @param string $key The LSobject type + * @param string $key The LSobject DN (optional, default: the container_dn of the LSobject type) * - * @retval boolean True is user can compute the result of the LSformat, False otherwise + * @return boolean True is user can compute the result of the LSformat, False otherwise */ public static function canComputeLSformat($LSformat, $LSobject, $dn=NULL) { foreach (getFieldInFormat($LSformat) as $attr) @@ -2485,12 +2485,12 @@ class LSsession { /** * Check user right to manage a specified relation of specified object * - * @param[in] string $dn The LSobject DN (optional, default: the container_dn of the LSobject type) - * @param[in] string $LSobject The LSobject type - * @param[in] string $relationName The relation name of the object - * @param[in] string $right The right to check (possible values: 'r' or 'w', optional, default: any) + * @param string $template The LSobject DN (optional, default: the container_dn of the LSobject type) + * @param string $template The LSobject type + * @param string $template The relation name of the object + * @param string $template The right to check (possible values: 'r' or 'w', optional, default: any) * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function relationCanAccess($dn,$LSobject,$relationName,$right=NULL) { $relConf=LSconfig :: get('LSobjects.'.$LSobject.'.LSrelation.'.$relationName); @@ -2541,11 +2541,11 @@ class LSsession { /** * Check user right to edit a specified relation of specified object * - * @param[in] string $dn The LSobject DN (optional, default: the container_dn of the LSobject type) - * @param[in] string $LSobject The LSobject type - * @param[in] string $relationName The relation name of the object + * @param string $template The LSobject DN (optional, default: the container_dn of the LSobject type) + * @param string $template The LSobject type + * @param string $template The relation name of the object * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function relationCanEdit($dn, $LSobject, $relationName) { return self :: relationCanAccess($dn, $LSobject, $relationName, 'w'); @@ -2554,11 +2554,11 @@ class LSsession { /** * Check user right to execute a customAction on specified object * - * @param[in] string $dn The LSobject DN - * @param[in] string $LSobject The LSobject type - * @param[in] string $customActionName The customAction name + * @param string $template The LSobject DN + * @param string $template The LSobject type + * @param string $template The customAction name * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canExecuteCustomAction($dn, $LSobject, $customActionName) { $conf=LSconfig :: get('LSobjects.'.$LSobject.'.customActions.'.$customActionName); @@ -2585,10 +2585,10 @@ class LSsession { /** * Check user right to execute a customAction on a specifed search * - * @param[in] string $LSsearch The LSsearch search - * @param[in] string $customActionName The customAction name + * @param string $template The LSsearch search + * @param string $template The customAction name * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canExecuteLSsearchCustomAction($LSsearch,$customActionName) { $conf=LSconfig :: get('LSobjects.'.$LSsearch -> LSobject.'.LSsearch.customActions.'.$customActionName); @@ -2618,10 +2618,10 @@ class LSsession { /** * Return user right to access to a LSaddon view * - * @param[in] string $LSaddon The LSaddon - * @param[in] string $viewId The LSaddon view ID + * @param string $template The LSaddon + * @param string $template The LSaddon view ID * - * @retval boolean True if user is granted, false otherwise + * @return boolean True if user is granted, false otherwise */ public static function canAccessLSaddonView($LSaddon,$viewId) { if (self :: loadLSaddon($LSaddon)) { @@ -2647,11 +2647,11 @@ class LSsession { /** * Add a temporary file that stored a specifed value * - * @param[in] string $value The value stored in the temporary file - * @param[in] string $filePath The temporary file path + * @param string $template The value stored in the temporary file + * @param string $template The temporary file path * @author Benjamin Renard * - * @retval void + * @return void **/ public static function addTmpFile($value, $filePath) { $hash = mhash(MHASH_MD5,$value); @@ -2664,9 +2664,9 @@ class LSsession { * * @author Benjamin Renard * - * @param[in] $value The value stored in the temporary file + * @param mixed $value The value stored in the temporary file * - * @retval string|false The temporary file path if exists, False otherwise + * @return string|false The temporary file path if exists, False otherwise **/ public static function tmpFileExist($value) { $hash = mhash(MHASH_MD5,$value); @@ -2685,9 +2685,9 @@ class LSsession { * * @author Benjamin Renard * - * @param[in] $value The value to store in the temporary file + * @param mixed $value The value to store in the temporary file * - * @retval string|false The path of the temporary file, false in case of error + * @return string|false The path of the temporary file, false in case of error **/ public static function getTmpFile($value) { $path = self :: tmpFileExist($value); @@ -2708,9 +2708,9 @@ class LSsession { * * @author Benjamin Renard * - * @param[in] $value The value to store in the temporary file + * @param mixed $value The value to store in the temporary file * - * @retval string|false The URL of the temporary file, false in case of error + * @return string|false The URL of the temporary file, false in case of error **/ public static function getTmpFileURL($value) { $path = self :: getTmpFile($value); @@ -2724,9 +2724,9 @@ class LSsession { * * @author Benjamin Renard * - * @param[in] $filename The filename + * @param string $filename The filename * - * @retval string|false The path of the temporary file if found, false otherwise + * @return string|false The path of the temporary file if found, false otherwise **/ public static function getTmpFileByFilename($filename) { foreach(self :: $tmp_file as $filePath => $contentHash) { @@ -2742,10 +2742,10 @@ class LSsession { * * @author Benjamin Renard * - * @param[in] string $filePath A specific temporary file path to delete + * @param string $template A specific temporary file path to delete * (optional, default: all temporary files wil be deleted) * - * @retval void + * @return void **/ public static function deleteTmpFile($filePath=NULL) { if ($filePath) { @@ -2767,7 +2767,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval boolean True if LSprofiles cache is enabled, false otherwise. + * @return boolean True if LSprofiles cache is enabled, false otherwise. */ public static function cacheLSprofiles() { return LSconfig :: get( @@ -2783,7 +2783,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval boolean True if subDn cache is enabled, false otherwise. + * @return boolean True if subDn cache is enabled, false otherwise. */ public static function cacheSudDn() { return LSconfig :: get( @@ -2799,7 +2799,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval boolean True if searchs cache is enabled, false otherwise. + * @return boolean True if searchs cache is enabled, false otherwise. */ public static function cacheSearch() { return LSconfig :: get( @@ -2815,7 +2815,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval boolean True if global search is enabled, false instead + * @return boolean True if global search is enabled, false instead */ public static function globalSearch() { return LSconfig :: get( @@ -2833,7 +2833,7 @@ class LSsession { * * @author Benjamin Renard * - * @retval string The label of current LDAP server subDn + * @return string The label of current LDAP server subDn */ public static function getSubDnLabel() { return __( @@ -2849,9 +2849,9 @@ class LSsession { /** * Return the name of a specifed subDn * - * @param[in] $subDn string The subDn (optional, default: the current one) + * @param string $key The subDn (optional, default: the current one) * - * @retval string The name of the current subDn if found or an empty string otherwise + * @return string The name of the current subDn if found or an empty string otherwise */ public static function getSubDnName($subDn=false) { if (!$subDn) { @@ -2869,9 +2869,9 @@ class LSsession { /** * Check if object type is used to list current LDAP server subDns * - * @param[in] $type string The LSobject type + * @param string $key The LSobject type * - * @retval boolean True if specified object type is used to list current LDAP server subDns, false otherwise + * @return boolean True if specified object type is used to list current LDAP server subDns, false otherwise */ public static function isSubDnLSobject($type) { $result = false; @@ -2888,10 +2888,10 @@ class LSsession { /** * Check if specified LSobject type is in current interface menu * - * @param[in] $type string The LSobject type - * @param[in] $topDn string The topDn to check (optional, default: current one) + * @param string $key The LSobject type + * @param string $key The topDn to check (optional, default: current one) * - * @retval boolean True if specified LSobject type is in current interface menu, false otherwise + * @return boolean True if specified LSobject type is in current interface menu, false otherwise */ public static function in_menu($LSobject, $topDn=NULL) { if (!$topDn) { @@ -2903,7 +2903,7 @@ class LSsession { /** * Check if current LDAP server have subDns * - * @retval boolean True if current LDAP server have subDns, false otherwise + * @return boolean True if current LDAP server have subDns, false otherwise */ public static function haveSubDn() { return (isset(self :: $ldapServer['subDn']) && is_array(self :: $ldapServer['subDn'])); @@ -2912,9 +2912,9 @@ class LSsession { /** * Add an information to display to user (on next displayed page or in API result) * - * @param[in] $msg string The message + * @param string $key The message * - * @retval void + * @return void */ public static function addInfo($msg) { $_SESSION['LSsession_infos'][]=$msg; @@ -2925,10 +2925,10 @@ class LSsession { * * /!\ DEPRECATED /!\ : please use LSurl :: redirect() * - * @param[in] $url string The destination URL - * @param[in] $exit boolean Unsed (keep for reto-compatibility) + * @param string $key The destination URL + * @param boolean $external Unsed (keep for reto-compatibility) * - * @retval void + * @return void */ public static function redirect($url, $exit=true) { LSerror :: addErrorCode( @@ -2945,7 +2945,7 @@ class LSsession { /** * Return the sender email address configured for the current LDAP server * - * @retval string The sender email address (if configured), false otherwise + * @return string The sender email address (if configured), false otherwise */ public static function getEmailSender() { return ( @@ -2958,7 +2958,7 @@ class LSsession { /** * Redirect to default view (if defined) * - * @retval void + * @return void */ public static function redirectToDefaultView($force=false) { if (isset(self :: $ldapServer['defaultView'])) { @@ -2977,10 +2977,10 @@ class LSsession { /** * Add help info * - * @param[in] $group string The group name of this information - * @param[in] $info array Array of the information to add (name => value) + * @param string $key The group name of this information + * @param string $key Array of the information to add (name => value) * - * @retval void + * @return void */ public static function addHelpInfos($group, $info) { LStemplate :: addHelpInfo($group, $info); @@ -3000,7 +3000,7 @@ class LSsession { * Note: could not be directly defined after PHP class declaration (like in othe class files) * because LSerror is not already loaded and initialized. It's done on self :: startLSerror(). * - * @retval void + * @return void */ private static function defineLSerrors() { /* @@ -3092,9 +3092,9 @@ class LSsession { /** * Ajax method when change ldapserver on login/recoveryPassword form * - * @param[in] $data array The return data address + * @param string $key The return data address * - * @retval void + * @return void **/ public static function ajax_onLdapServerChangedLogin(&$data) { if ( isset($_REQUEST['server']) ) { @@ -3121,7 +3121,7 @@ class LSsession { /** * Set globals from the ldap server * - * @retval void + * @return void */ public static function setGlobals() { if ( isset(self :: $ldapServer['globals'])) { @@ -3134,16 +3134,16 @@ class LSsession { /** * Register a LSaddon view * - * @param[in] $LSaddon string The LSaddon - * @param[in] $viewId string The view ID - * @param[in] $label string The view's label - * @param[in] $viewFunction string The view's function name - * @param[in] $allowedLSprofiles array|null Array listing allowed profiles. + * @param string $key The LSaddon + * @param string $key The view ID + * @param string $key The view's label + * @param string $key The view's function name + * @param string|null $prefix Array listing allowed profiles. * If null, no access control will * be done for this view. - * @param[in] $showInMenu boolean Show (or not) this view in menu + * @param boolean $external Show (or not) this view in menu * - * @retval bool True is the view have been registred, false otherwise + * @return bool True is the view have been registred, false otherwise **/ public static function registerLSaddonView($LSaddon,$viewId,$label,$viewFunction,$allowedLSprofiles=null,$showInMenu=True) { if (function_exists($viewFunction)) { @@ -3185,10 +3185,10 @@ class LSsession { /** * Show LSaddon view * - * @param[in] $LSaddon string The LSaddon - * @param[in] $viewId string The view ID + * @param string $key The LSaddon + * @param string $key The view ID * - * @retval void + * @return void **/ public static function showLSaddonView($LSaddon,$viewId) { if (self :: canAccessLSaddonView($LSaddon,$viewId)) { diff --git a/src/includes/class/class.LSsmoothbox.php b/src/includes/class/class.LSsmoothbox.php index 9c4b6b66..20b5658b 100644 --- a/src/includes/class/class.LSsmoothbox.php +++ b/src/includes/class/class.LSsmoothbox.php @@ -25,7 +25,7 @@ class LSsmoothbox { /* * Méthode chargeant les dépendances d'affichage * - * @retval void + * @return void */ public static function loadDependenciesDisplay() { if (LSsession :: loadLSclass('LSconfirmBox')) { diff --git a/src/includes/class/class.LStemplate.php b/src/includes/class/class.LStemplate.php index f29a8590..a9aa8c46 100644 --- a/src/includes/class/class.LStemplate.php +++ b/src/includes/class/class.LStemplate.php @@ -99,9 +99,9 @@ class LStemplate extends LSlog_staticLoggerClass { * Set configuration from parameter $config and initialize * Smarty object. * - * @param[in] $config array LStemplate configuration + * @param array $config LStemplate configuration * - * @retval boolean True on success, False instead + * @return boolean True on success, False instead **/ public static function start($config) { // Trigger starting event @@ -179,7 +179,7 @@ class LStemplate extends LSlog_staticLoggerClass { * * Return LS_THEME contanst value or 'default' if not defined * - * @retval string The default directory path of files + * @return string The default directory path of files **/ public static function getDefaultDir() { if (defined('LS_THEME')) @@ -191,12 +191,12 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the file to use * - * @param[in] string $name The file name (eg: mail.png) - * @param[in] string $root_dir The root directory (eg: images) - * @param[in] string $default_dir The default directory (eg: default) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The file name (eg: mail.png) + * @param string $name The root directory (eg: images) + * @param string $name The default directory (eg: default) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the file + * @return string The path of the file **/ public static function getFilePath($file, $root_dir, $default_dir=null, $with_nocache=false) { if ($default_dir === null) @@ -234,10 +234,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the image file to use * - * @param[in] string $image The image name (eg: mail) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The image name (eg: mail) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the image file + * @return string The path of the image file **/ public static function getImagePath($image, $with_nocache=false) { $exts=array('svg', 'png', 'gif', 'jpg'); @@ -251,10 +251,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the CSS file to use * - * @param[in] string $css The CSS name (eg: main.css) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The CSS name (eg: main.css) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the CSS file + * @return string The path of the CSS file **/ public static function getCSSPath($css, $with_nocache=false) { return self :: getFilePath($css, self :: $config['css_dir'], Null, $with_nocache); @@ -263,10 +263,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the JS file to use * - * @param[in] string $js The JS name (eg: LSdefaults.js) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The JS name (eg: LSdefaults.js) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the CSS file + * @return string The path of the CSS file **/ public static function getJSPath($js, $with_nocache=false) { return self :: getFilePath($js, self :: $config['js_dir'], Null, $with_nocache); @@ -275,10 +275,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the libary file to use * - * @param[in] string $file_path The lib file path (eg: arian-mootools-datepicker/Picker.js) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The lib file path (eg: arian-mootools-datepicker/Picker.js) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the Lib file + * @return string The path of the Lib file **/ public static function getLibFilePath($file_path, $with_nocache=false) { return self :: getFilePath($file_path, self :: $config['libs_dir'], Null, $with_nocache); @@ -287,10 +287,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the path of the Smarty template file to use * - * @param[in] string $template The template name (eg: base.tpl) - * @param[in] bool $with_nocache If true, include nocache URL param (default: false) + * @param string $name The template name (eg: base.tpl) + * @param string $name If true, include nocache URL param (default: false) * - * @retval string The path of the Smarty template file + * @return string The path of the Smarty template file **/ public static function getTemplatePath($template, $with_nocache=false) { if (in_array($template, self :: $deprecated_template_files)) @@ -306,9 +306,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the nocache value of the specify file * - * @param[in] string $file The file path + * @param string $name The file path * - * @retval string The specified file's nocache value + * @return string The specified file's nocache value **/ public static function getNoCacheFileValue($file) { $stat = @stat($file); @@ -320,9 +320,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Return the content of a Smarty template file. * - * @param[in] string $template The template name (eg: base.tpl) + * @param string $name The template name (eg: base.tpl) * - * @retval string The content of the Smarty template file + * @return string The content of the Smarty template file **/ public static function getTemplateSource($template) { $tpl_path=self :: getTemplatePath($template); @@ -342,9 +342,9 @@ class LStemplate extends LSlog_staticLoggerClass { * Return the timestamp of the last change of a Smarty * template file. * - * @param[in] string $template The template name (eg: base.tpl) + * @param string $name The template name (eg: base.tpl) * - * @retval string The timestamp of the last change of the Smarty template file + * @return string The timestamp of the last change of the Smarty template file **/ public static function getTemplateTimestamp($template) { $tpl_path=self :: getTemplatePath($template); @@ -359,10 +359,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Assign template variable * - * @param[in] string $name The variable name - * @param[in] mixed $value The variable value + * @param string $name The variable name + * @param string $name The variable value * - * @retval void + * @return void **/ public static function assign($name,$value) { return self :: $_smarty -> assign($name,$value); @@ -371,7 +371,7 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Assign common template variables * - * @retval void + * @return void **/ public static function assignCommonVars() { // JS config @@ -414,9 +414,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Display a template * - * @param[in] string $template The template name (eg: base_connected.tpl) + * @param string $name The template name (eg: base_connected.tpl) * - * @retval void + * @return void **/ public static function display($template) { // Trigger displaying event @@ -445,9 +445,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Fetch a template * - * @param[in] string $template The template name (eg: base_connected.tpl) + * @param string $name The template name (eg: base_connected.tpl) * - * @retval string The template compiled + * @return string The template compiled **/ public static function fetch($template) { try { @@ -461,9 +461,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Handle fatal error * - * @param[in] $error string|null Error message (optional) + * @param string|null $error Error message (optional) * - * @retval void + * @return void **/ public static function fatal_error($error=null) { http_response_code(500); @@ -493,10 +493,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Register a template function * - * @param[in] string $name The function name in template - * @param[in] string $function_name The function name in PHP + * @param string $name The function name in template + * @param string $name The function name in PHP * - * @retval void + * @return void */ public static function registerFunction($name,$function_name) { LStemplate_register_function($name,$function_name); @@ -505,11 +505,11 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Registered an action on a specific event * - * @param[in] $event string The event name - * @param[in] $callable callable The callable to run on event - * @param[in] $param mixed Paremeters that will be pass to the callable + * @param array $config The event name + * @param callable $callable The callable to run on event + * @param array $config Paremeters that will be pass to the callable * - * @retval void + * @return void */ public static function addEvent($event,$callable,$param=NULL) { self :: $_events[$event][] = array( @@ -521,9 +521,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Run triggered actions on specific event * - * @param[in] $event string Event name + * @param array $config Event name * - * @retval boolean True if all triggered actions succefully runned, false otherwise + * @return boolean True if all triggered actions succefully runned, false otherwise */ public static function fireEvent($event) { $return = true; @@ -536,12 +536,12 @@ class LStemplate extends LSlog_staticLoggerClass { call_user_func_array($e['callable'],array(&$e['param'])); } catch(Exception $er) { - LSerror :: addErrorCode('LStemplate_03',array('callable' => getCallableName($e['callable']),'event' => $event)); + LSerror :: addErrorCode('LStemplate_03',array('callable' => format_callable($e['callable']),'event' => $event)); $return = false; } } else { - LSerror :: addErrorCode('LStemplate_02',array('callable' => getCallableName($e['callable']),'event' => $event)); + LSerror :: addErrorCode('LStemplate_02',array('callable' => format_callable($e['callable']),'event' => $event)); $return = false; } } @@ -558,12 +558,12 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add a JS script to load on page * - * @param[in] $file string The JS filename + * @param array $config The JS filename * * Note: about old $path of the LStemplate :: addJSscript() method, corresponding to * the sub-directory path that contain the file, you could just prefix the file name. * - * @retval void + * @return void */ public static function addJSscript($file) { if (!in_array($file, self :: $JSscripts)) @@ -573,9 +573,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add a library JS file to load on page * - * @param[in] $file string The JS filename + * @param array $config The JS filename * - * @retval void + * @return void */ public static function addLibJSscript($file) { if (!in_array($file, self :: $LibsJSscripts)) @@ -585,10 +585,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add Javascript configuration parameter * - * @param[in] $name string Name of the configuration parameter - * @param[in] $val mixed Value of the configuration parameter + * @param array $config Name of the configuration parameter + * @param array $config Value of the configuration parameter * - * @retval void + * @return void */ public static function addJSconfigParam($name,$val) { self :: $JSconfigParams[$name]=$val; @@ -597,7 +597,7 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Get Javascript configuration parameters * - * @retval array Javascript configuration parameters + * @return array Javascript configuration parameters */ public static function getJSconfigParam() { return self :: $JSconfigParams; @@ -606,10 +606,10 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add help info * - * @param[in] $group string The group name of this information - * @param[in] $info array Array of the information to add (name => value) + * @param array $config The group name of this information + * @param array $config Array of the information to add (name => value) * - * @retval void + * @return void */ public static function addHelpInfo($group, $info) { if (is_array($info)) { @@ -625,12 +625,12 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add a CSS file to load on page * - * @param[in] $file string The CSS filename + * @param array $config The CSS filename * * Note: about old $path of the LStemplate :: addCssFile() method, corresponding to * the sub-directory path that contain the file, you could just prefix the file name. * - * @retval void + * @return void */ public static function addCssFile($file) { if (!in_array($file, self :: $CssFiles)) @@ -640,9 +640,9 @@ class LStemplate extends LSlog_staticLoggerClass { /** * Add a library CSS file to load on page * - * @param[in] $file string The CSS filename + * @param array $config The CSS filename * - * @retval void + * @return void */ public static function addLibCssFile($file) { if (!in_array($file, self :: $LibsCssFiles)) diff --git a/src/includes/class/class.LStemplate_smarty2_support.php b/src/includes/class/class.LStemplate_smarty2_support.php index 8907f7e2..534ec5b6 100644 --- a/src/includes/class/class.LStemplate_smarty2_support.php +++ b/src/includes/class/class.LStemplate_smarty2_support.php @@ -28,10 +28,10 @@ /** * Retrieve a resource * - * @param[in] $tpl_name string The template name - * @param[in] $tpl_source string Variable passed by reference + * @param string $tpl_name The template name + * @param string $tpl_source Variable passed by reference * where the result should be stored. - * @param[in] $smarty_obj object The Smarty object + * @param Smarty $smarty_obj object The Smarty object * * @return bool TRUE if it was able to successfully retrieve * the resource and FALSE otherwise. @@ -44,10 +44,10 @@ function LStemplate_smarty_get_template ($tpl_name, &$tpl_source, &$smarty_obj) /** * Retrieve the last modification timestamp of a template * - * @param[in] $tpl_name string The template name - * @param[in] $tpl_timestamp int Variable passed by reference + * @param string $tpl_name The template name + * @param int $tpl_timestamp Variable passed by reference * where the result should be stored. - * @param[in] $smarty_obj object The Smarty object + * @param Smarty $smarty_obj object The Smarty object * * @return bool TRUE if the timestamp could be succesfully determined, * or FALSE otherwise @@ -67,8 +67,8 @@ function LStemplate_smarty_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_ob * This function is used only for template resources but should * still be defined. * - * @param[in] $tpl_name string The template name - * @param[in] $smarty_obj object The Smarty object + * @param string $tpl_name The template name + * @param Smarty $smarty_obj object The Smarty object * * @return bool TRUE if the template is secured, or FALSE otherwise **/ @@ -84,8 +84,8 @@ function LStemplate_smarty_get_secure($tpl_name, &$smarty_obj) { * src attribute. However, it should still be defined even * for template resources. * - * @param[in] $tpl_name string The template name - * @param[in] $smarty_obj object The Smarty object + * @param string $tpl_name The template name + * @param Smarty $smarty_obj object The Smarty object * * @return bool TRUE if the template is trusted, or FALSE otherwise **/ @@ -104,10 +104,10 @@ LStemplate :: $_smarty -> register_resource('ls', array( /** * Register a template function * - * @param[in] string $name The function name in template - * @param[in] string $function_name The function name in PHP + * @param string $name The function name in template + * @param string $function_name The function name in PHP * - * @retval void + * @return void */ function LStemplate_register_function($name,$function_name) { LStemplate :: $_smarty -> register_function($name,$function_name); diff --git a/src/includes/class/class.LStemplate_smarty3_support.php b/src/includes/class/class.LStemplate_smarty3_support.php index 99b25c7c..0397011e 100644 --- a/src/includes/class/class.LStemplate_smarty3_support.php +++ b/src/includes/class/class.LStemplate_smarty3_support.php @@ -63,10 +63,10 @@ LStemplate :: $_smarty -> registerResource('ls', new Smarty_Resource_LdapSaisie( /** * Register a template function * - * @param[in] string $name The function name in template - * @param[in] string $function_name The function name in PHP + * @param string $name The function name in template + * @param string $function_name The function name in PHP * - * @retval void + * @return void */ function LStemplate_register_function($name,$function_name) { LStemplate :: $_smarty -> registerPlugin("function",$name,$function_name); diff --git a/src/includes/class/class.LSurl.php b/src/includes/class/class.LSurl.php index 72c31983..a4c7359c 100644 --- a/src/includes/class/class.LSurl.php +++ b/src/includes/class/class.LSurl.php @@ -59,12 +59,12 @@ class LSurl extends LSlog_staticLoggerClass { /** * Add an URL pattern * - * @param[in] $pattern string The URL pattern (required) - * @param[in] $handler callable The URL pattern handler (must be callable, required) - * @param[in] $authenticated boolean Permit to define if this URL is accessible only for authenticated users (optional, default: true) - * @param[in] $override boolean Allow override if a command already exists with the same name (optional, default: false) - * @param[in] $api_mode boolean Enable API mode (optional, default: false) - * @param[in] $methods array|null HTTP method (optional, default: array('GET', 'POST')) + * @param string $pattern The URL pattern (required) + * @param callable $handler The URL pattern handler (must be callable, required) + * @param boolean $authenticated Permit to define if this URL is accessible only for authenticated users (optional, default: true) + * @param boolean $authenticated Allow override if a command already exists with the same name (optional, default: false) + * @param boolean $authenticated Enable API mode (optional, default: false) + * @param array|null $methods HTTP method (optional, default: array('GET', 'POST')) **/ public static function add_handler($pattern, $handler=null, $authenticated=true, $override=true, $api_mode=false, $methods=null) { if (is_null($methods)) @@ -106,10 +106,10 @@ class LSurl extends LSlog_staticLoggerClass { /** * Interprets the requested URL and return the corresponding LSurlRequest object * - * @param[in] $default_url string|null The default URL if current one does not + * @param array|null $methods The default URL if current one does not * match with any configured pattern. * - * @retval LSurlRequest The LSurlRequest object corresponding to the the requested URL. + * @return LSurlRequest The LSurlRequest object corresponding to the the requested URL. **/ private static function get_request($default_url=null) { $current_url = self :: get_current_url(); @@ -156,11 +156,11 @@ class LSurl extends LSlog_staticLoggerClass { /** * Check if the current requested URL match with a specific pattern * - * @param[in] $pattern string The URL pattern - * @param[in] $current_url string|false The current URL (optional) - * @param[in] $methods array|null HTTP method (optional, default: no check) + * @param string $pattern The URL pattern + * @param array|null $methods The current URL (optional) + * @param array|null $methods HTTP method (optional, default: no check) * - * @retval array|false The URL info if pattern matched, false otherwise. + * @return array|false The URL info if pattern matched, false otherwise. **/ private static function url_match($pattern, $current_url=false, $methods=null) { if ($methods && !in_array($_SERVER['REQUEST_METHOD'], $methods)) @@ -179,9 +179,9 @@ class LSurl extends LSlog_staticLoggerClass { /** * Get the public absolute URL * - * @param[in] $relative_url string|null Relative URL to convert (Default: current URL) + * @param array|null $methods Relative URL to convert (Default: current URL) * - * @retval string The public absolute URL + * @return string The public absolute URL **/ public static function get_public_absolute_url($relative_url=null) { if (!is_string($relative_url)) @@ -203,9 +203,9 @@ class LSurl extends LSlog_staticLoggerClass { /** * Trigger redirect to specified URL (or homepage if omited) * - * @param[in] $go string|false The destination URL + * @param array|null $methods The destination URL * - * @retval void + * @return void **/ public static function redirect($go=false) { $public_root_url = LSconfig :: get('public_root_url', '/', 'string'); @@ -241,9 +241,9 @@ class LSurl extends LSlog_staticLoggerClass { /** * Error 404 handler * - * @param[in] $request LSurlRequest|null The request (optional, default: null) + * @param LSurlRequest|null $request The request (optional, default: null) * - * @retval void + * @return void **/ public static function error_404($request=null) { http_response_code(404); @@ -262,10 +262,10 @@ class LSurl extends LSlog_staticLoggerClass { /** * Handle the current requested URL * - * @param[in] $default_url string|null The default URL if current one does not + * @param array|null $methods The default URL if current one does not * match with any configured pattern. * - * @retval void + * @return void **/ public static function handle_request($default_url=null) { self :: $request = self :: get_request($default_url); @@ -299,7 +299,7 @@ class LSurl extends LSlog_staticLoggerClass { catch (Exception $e) { self :: log_exception( $e, "An exception occured running URL handler function ". - getCallableName(self :: $request -> handler) + format_callable(self :: $request -> handler) ); self :: log_fatal(_("This request could not be processed correctly.")); } @@ -312,7 +312,7 @@ class LSurl extends LSlog_staticLoggerClass { /* * Try to detect current requested URL and return it * - * @retval string|false The current request URL or false if detection fail + * @return string|false The current request URL or false if detection fail **/ private static function get_current_url() { self :: log_debug("URL : request URI = '".$_SERVER['REQUEST_URI']."'"); @@ -348,7 +348,7 @@ class LSurl extends LSlog_staticLoggerClass { /** * Try to detect rewrite base from public root URL * - * @retval string The detected rewrite base + * @return string The detected rewrite base **/ private static function get_rewrite_base() { $public_root_url = LSconfig :: get('public_root_url', '/', 'string'); @@ -365,9 +365,9 @@ class LSurl extends LSlog_staticLoggerClass { /** * Remove trailing slash in specified URL * - * @param[in] $url string The URL + * @param string $pattern The URL * - * @retval string The specified URL without trailing slash + * @return string The specified URL without trailing slash **/ private static function remove_trailing_slash($url) { if ($url == '/') diff --git a/src/includes/class/class.LSurlRequest.php b/src/includes/class/class.LSurlRequest.php index 45d4dd5b..867742e0 100644 --- a/src/includes/class/class.LSurlRequest.php +++ b/src/includes/class/class.LSurlRequest.php @@ -54,9 +54,9 @@ class LSurlRequest extends LSlog_staticLoggerClass { /** * Get request info * - * @param[in] $key string The name of the info + * @param string $key The name of the info * - * @retval mixed The value + * @return mixed The value **/ public function __get($key) { if ($key == 'current_url') @@ -83,9 +83,9 @@ class LSurlRequest extends LSlog_staticLoggerClass { /** * Check is request info is set * - * @param[in] $key string The name of the info + * @param string $key The name of the info * - * @retval boolval True is info is set, False otherwise + * @return boolval True is info is set, False otherwise **/ public function __isset($key) { if (in_array($key, array('current_url', 'handler', 'authenticated'))) @@ -96,7 +96,7 @@ class LSurlRequest extends LSlog_staticLoggerClass { /* * Get request referer (if known) * - * @retval string|null The request referer URL if known, null otherwise + * @return string|null The request referer URL if known, null otherwise */ public function get_referer() { if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) diff --git a/src/includes/functions.php b/src/includes/functions.php index f722e378..72037490 100644 --- a/src/includes/functions.php +++ b/src/includes/functions.php @@ -28,14 +28,14 @@ * * @author Benjamin Renard * - * @param[in] $format string Format de la chaine - * @param[in] $data mixed Les données pour composés la chaine + * @param string $format Format de la chaine + * @param string $format Les données pour composés la chaine * Ce paramètre peut être un tableau de string, une string, * une tableau d'objet ou un objet. - * @param[in] $meth string Le nom de la methode de/des objet(s) à appeler pour + * @param string $format Le nom de la methode de/des objet(s) à appeler pour * obtenir la valeur de remplacement dans la chaine formatée. * - * @retval string La chaine formatée + * @return string La chaine formatée */ function getFData($format,$data,$meth=NULL) { $unique=false; @@ -329,12 +329,12 @@ function LSdebugDefined() { * * Vérifie que les DNs sont dans la même branche de l'annuaire. * - * @param[in] $dn Un premier DN. - * @param[in] $dn Un deuxième DN. + * @param string $dn1 Un premier DN. + * @param string $dn2 Un deuxième DN. * * @author Benjamin Renard * - * @retval boolean true si les DN sont compatibles, false sinon. + * @return boolean true si les DN sont compatibles, false sinon. */ function isCompatibleDNs($dn1,$dn2) { $infos1=ldap_explode_dn($dn1,0); @@ -365,12 +365,12 @@ function isCompatibleDNs($dn1,$dn2) { * Retourne un DN qui correspond au point de séparation des DN si les DN * ne sont pas dans la meme dans la meme branche ou le dn le plus long sinon. * - * @param[in] $dn Un premier DN. - * @param[in] $dn Un deuxième DN. + * @param string $dn1 Un premier DN. + * @param string $dn2 Un deuxième DN. * * @author Benjamin Renard * - * @retval string Un DN (ou false si les DN ne sont pas valide) + * @return string Un DN (ou false si les DN ne sont pas valide) */ function sumDn($dn1,$dn2) { $infos1=ldap_explode_dn($dn1,0); @@ -509,9 +509,9 @@ function compareDn($a,$b) { /** * Translate message by using LSlang or Gettext methods * - * @param[in] @msg string The message + * @param string $msg The message * - * @retval string The translated message if translation available, the original message otherwise + * @return string The translated message if translation available, the original message otherwise **/ function __($msg) { if (empty($msg)) return $msg; @@ -527,9 +527,9 @@ function __($msg) { * Just-return the input message. This function permit the detection of message * that will be translated only at display time and not at declare time. * - * @param[in] @msg string The message + * @param string $msg The message * - * @retval string The message (unchanged) + * @return string The message (unchanged) **/ function ___($msg) { return $msg; @@ -547,9 +547,9 @@ if (!function_exists('unidecode') && function_exists('mb_ord')) { /** * Supprime les accents d'une chaine * - * @param[in] $string La chaine originale + * @param string $string La chaine originale * - * @retval string La chaine sans les accents + * @return string La chaine sans les accents */ function withoutAccents($string){ // Use unidecode lib if available @@ -575,10 +575,10 @@ function withoutAccents($string){ /** * Supprime les espaces d'une chaine en les remplacant par un motif ou non * - * @param[in] $str La chaine originale - * @param[in] $to Le motif de remplacement. S'il n'est pas spécifié, les espaces seront simplement supprimés + * @param string $str La chaine originale + * @param string $to Le motif de remplacement. S'il n'est pas spécifié, les espaces seront simplement supprimés * - * @retval string La chaine sans les espaces + * @return string La chaine sans les espaces **/ function replaceSpaces($str,$to='') { return strtr($str,array ( @@ -591,10 +591,10 @@ function withoutAccents($string){ /** * List files in a directory corresponding to a regex * - * @param[in] $dir The path of the directory - * @param[in] $regex The regex apply on filename + * @param string $dir The path of the directory + * @param string $regex The regex apply on filename * - * @retval array() List of file name + * @return array() List of file name **/ function listFiles($dir,$regex) { $retval=array(); @@ -614,43 +614,20 @@ function withoutAccents($string){ /** * Return current date in LDAP format * - * @param[in] $mixed Anything (to permit using as generated function) + * @param mixed $mixed Anything (to permit using as generated function) * - * @retval string The current date in LDAP format (YYYYMMDDHHMMSSZ) + * @return string The current date in LDAP format (YYYYMMDDHHMMSSZ) **/ function now($mixed=Null) { return date ('YmdHis').'Z'; } - - /** - * Format callable name - * - * @param[in] $callable The callable - * - * @retval string The formated callable name - **/ - function getCallableName($callable) { - if (is_string($callable)) { - return $callable.'()'; - } - elseif(is_array($callable) && count($callable)==2) { - if (is_string($callable[0])) { - return $callable[0].'::'.$callable[1].'()'; - } - elseif(is_object($callable[0])) { - return "object ".get_class($callable[0])."->".$callable[1].'()'; - } - } - return "unknown : ".(string)$callable; - } - /** * Check if a path is absolute * - * @param[in] $path string The path + * @param string $path The path * - * @retval boolean True if path is absolute, False otherwise + * @return boolean True if path is absolute, False otherwise */ function isAbsolutePath($path) { return strStartWith($path, '/') || strStartWith($path, './') || strStartWith($path, '../'); @@ -659,10 +636,10 @@ function isAbsolutePath($path) { /** * Check if a string start with another specified string * - * @param[in] $string string The string to search in - * @param[in] $start_string string The starting string to check + * @param string $string The string to search in + * @param string $start_string The starting string to check * - * @retval boolean True if string start by specified one, False otherwise + * @return boolean True if string start by specified one, False otherwise */ function strStartWith($string, $start_string) { if (strlen($start_string) > strlen($string)) @@ -673,14 +650,14 @@ function strStartWith($string, $start_string) { /** * Dump file content * - * @param[in] $file_path string The file path to dump - * @param[in] $mime_type string|null The MIME type return as Content-type (optional, default: auto-detected) - * @param[in] $max_age integer The cache max_age value, as return in Cache-Control HTTP header + * @param string $file_path The file path to dump + * @param string|null $mime_type The MIME type return as Content-type (optional, default: auto-detected) + * @param int $max_age The cache max_age value, as return in Cache-Control HTTP header * (optional, default: 3600) - * @param[in] $force_download boolean Set to true to force download (optional, default: false) - * @param[in] $filename string Specific filename in case of force download (optional, default: orignal filename) + * @param boolean $force_download Set to true to force download (optional, default: false) + * @param string|null $filename Specific filename in case of force download (optional, default: orignal filename) * - * @retval void + * @return void **/ function dumpFile($file_path, $mime_type=null, $max_age=3600, $force_download=false, $filename=null) { if (is_file($file_path)) { @@ -730,15 +707,16 @@ function dumpFile($file_path, $mime_type=null, $max_age=3600, $force_download=fa * @return string The callable object string representation */ function format_callable($callable) { - if (is_array($callable)) - if (is_string($callable[0])) - return $callable[0]."::".$callable[1]."()"; - elseif (is_object($callable[0])) - return get_class($callable[0])."->".$callable[1]."()"; - else - return "Unkown->".$callable[1]."()"; - else - return $callable."()"; + if (is_string($callable)) + return $callable."()"; + if (is_array($callable) && count($callable)==2) + if (is_string($callable[0])) + return $callable[0]."::".$callable[1]."()"; + elseif (is_object($callable[0])) + return get_class($callable[0])."->".$callable[1]."()"; + else + return "Unkown->".$callable[1]."()"; + return varDump($callable); } function is_empty($val) { diff --git a/src/includes/js/functions.js b/src/includes/js/functions.js index f09beb72..d0c8cc41 100644 --- a/src/includes/js/functions.js +++ b/src/includes/js/functions.js @@ -24,10 +24,10 @@ function LSdebug(arguments) { * * @author Benjamin Renard * - * @param[in] $format string String Format - * @param[in] $data mixed Data used to compose the string. + * @param string $format String Format + * @param mixed $data Data used to compose the string. * It can be strings array or object. - * @param[in] $meth string Object method name to call to get the new value for the formatted string. + * @param string $meth Object method name to call to get the new value for the formatted string. * * Invocation example : * getFData('%{test1} je %{test2}',{ @@ -40,7 +40,7 @@ function LSdebug(arguments) { * } * },'getValue'); * - * @retval string The formatted string + * @return string The formatted string */ function getFData(format,data,meth) { /* @@ -212,9 +212,9 @@ function _getFData_extractAndModify(data,ch) { /** * Delete accentuated characters in a string * -* @param[in] $string Original string +* @param string str Original string * -* @retval string de-accentuated string +* @return string de-accentuated string */ function replaceAccents(str) { let accent = "àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ"; @@ -233,10 +233,10 @@ function replaceAccents(str) { /** * Replace spaces or tabs of a string by an argument * -* @param[in] $string The original string -* @param[in] $string The character to set instead of spaces or tabs +* @param string str The original string +* @param string to The character to set instead of spaces or tabs * -* @retval string The modified outspaced string +* @return string The modified outspaced string */ function replaceSpaces(str,to) { if (!$type(to)) { @@ -252,11 +252,11 @@ function replaceSpaces(str,to) { /** * Add one variable with value in URL - * @param[in] url string The original URL - * @param[in] name string The variable name - * @param[in] value string The value of the variable + * @param string url The original URL + * @param string name The variable name + * @param string value The value of the variable * - * @retval string The URL with the value + * @return string The URL with the value */ function urlAddVar(url,name,value) { if ($type(url)) { diff --git a/src/includes/libs/class.smbHash.php b/src/includes/libs/class.smbHash.php index a0787ecc..5af0f5e6 100644 --- a/src/includes/libs/class.smbHash.php +++ b/src/includes/libs/class.smbHash.php @@ -141,7 +141,7 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5 } /** - * @param integer count + * @param integer $count * @param array $data * @return array */ @@ -154,8 +154,9 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5 } /** - * @param array in input data - * @param array p permutation + * @param array $in input data + * @param array $p permutation + * @param int $n max * @return array */ function permute($in, $p, $n) { diff --git a/src/includes/routes.php b/src/includes/routes.php index 11b8903e..fbff8d77 100644 --- a/src/includes/routes.php +++ b/src/includes/routes.php @@ -27,9 +27,9 @@ /* * Handle index request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_index($request) { // Redirect to default view (if defined) @@ -49,9 +49,9 @@ LSurl :: add_handler('#^(index\.php|index)?$#', 'handle_index', true); /* * Handle ajax keepLSsession request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_ajax_keepLSsession($request) { LSsession :: displayAjaxReturn(null); @@ -61,9 +61,9 @@ LSurl :: add_handler('#^ajax/keepLSsession/?$#', 'handle_ajax_keepLSsession', tr /* * Handle ajax request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_ajax($request) { LSsession :: setAjaxDisplay(); @@ -105,9 +105,9 @@ LSurl :: add_handler('#^ajax/(?Pclass|addon)/(?P[^/]+)/(?Pimage|css|js)/(?P[^/]+)$#', 'handle_stati /* * Handle default browser favicon.ico request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void */ function handle_favicon_ico_view($request) { LSurl :: redirect('image/favicon'); @@ -300,9 +300,9 @@ LSurl :: add_handler('#^favicon\.ico#', 'handle_favicon_ico_view', false, true, /* * Handle libs file request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_libs_file($request) { $path = LStemplate :: getLibFilePath($request -> file); @@ -326,9 +326,9 @@ LSurl :: add_handler('#^libs/(?P.+)$#', 'handle_libs_file', false, true, f /* * Handle tmp file request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_tmp_file($request) { $path = LSsession :: getTmpFileByFilename($request -> filename); @@ -354,12 +354,12 @@ LSurl :: add_handler('#^tmp/(?P[^/]+)$#', 'handle_tmp_file', true, tru * return. Moreover, if 'dn' request parameter is present, * the data of this object will be loaded from LDAP. * - * @param[in] $request LSurlRequest The request - * @param[in] $instanciate boolean Instanciate and return an object (optional, default: true) - * @param[in] $check_access callable|null Permit to specify check access method (optional, default: LSsession :: canAccess()) - * @param[in] $api_mode boolean Enable API mode (optional, default: false) + * @param LSurlRequest $request The request + * @param boolean $instanciate Instanciate and return an object (optional, default: true) + * @param callable|null $check_access Permit to specify check access method (optional, default: LSsession :: canAccess()) + * @param boolean $instanciate Enable API mode (optional, default: false) * - * @retval LSobject|boolean The instanciated LSobject (or True if $instanciate=false), or False + * @return LSobject|boolean The instanciated LSobject (or True if $instanciate=false), or False * on error/access refused */ function get_LSobject_from_request($request, $instanciate=true, $check_access=null, $api_mode=false) { @@ -420,9 +420,9 @@ function get_LSobject_from_request($request, $instanciate=true, $check_access=nu /* * Handle LSobject search/list request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_search($request) { $object = get_LSobject_from_request($request, true); @@ -540,9 +540,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/?$#', 'handle_LSobject_search /* * Handle LSobject search custom action request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_search_customAction($request) { $object = get_LSobject_from_request($request, true); @@ -580,7 +580,7 @@ function handle_LSobject_search_customAction($request) { 'LSsession_13', array( 'customAction' => $title, - 'function' => ($function?getCallableName($function):_('undefined')) + 'function' => ($function?format_callable($function):_('undefined')) ) ); LSsession :: displayTemplate(); @@ -642,9 +642,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/customAction/(?P[^/]+)/?$#', 'handle_LSobj /* * Handle old select.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_select_php($request) { if (!isset($_GET['LSobject'])) @@ -787,9 +787,9 @@ LSurl :: add_handler('#^select\.php#', 'handle_old_select_php', false); /* * Handle LSobject import request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_import($request) { $object = get_LSobject_from_request($request, true); @@ -827,9 +827,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/import/?$#', 'handle_LSobject /* * Handle old import.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_import_php($request) { if (!isset($_GET['LSobject'])) @@ -854,9 +854,9 @@ LSurl :: add_handler('#^import\.php#', 'handle_old_import_php', false); /* * Handle LSobject export request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_export($request) { $object = get_LSobject_from_request($request, true); @@ -891,9 +891,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/export/?$#', 'handle_LSobject /* * Handle LSobject create request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_create($request) { $object = get_LSobject_from_request( @@ -1002,9 +1002,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/create/?$#', 'handle_LSobject /* * Handle old create.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_create_php($request) { if (!isset($_GET['LSobject'])) @@ -1029,9 +1029,9 @@ LSurl :: add_handler('#^create\.php#', 'handle_old_create_php', false); /* * Handle LSobject show request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_show($request) { $object = get_LSobject_from_request($request, true); @@ -1106,9 +1106,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/?(?P[^/]+)/?$#', 'handle_ /* * Handle old view.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_view_php($request) { if (!isset($_GET['LSobject'])) @@ -1135,9 +1135,9 @@ LSurl :: add_handler('#^view\.php#', 'handle_old_view_php', false); /* * Handle LSobject modify request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_modify($request) { $object = get_LSobject_from_request( @@ -1226,9 +1226,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/(?P[^/]+)/modify/?$#', 'h /* * Handle old modify.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_modify_php($request) { if (!isset($_GET['LSobject']) || !isset($_GET['dn'])) @@ -1253,9 +1253,9 @@ LSurl :: add_handler('#^modify\.php#', 'handle_old_modify_php', false); /* * Handle LSobject remove request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_remove($request) { $object = get_LSobject_from_request( @@ -1314,9 +1314,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/(?P[^/]+)/remove/?$#', 'h /* * Handle old remove.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_remove_php($request) { if (!isset($_GET['LSobject']) || !isset($_GET['dn'])) @@ -1343,9 +1343,9 @@ LSurl :: add_handler('#^remove\.php#', 'handle_old_remove_php', false); /* * Handle LSobject customAction request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_LSobject_customAction($request) { $object = get_LSobject_from_request($request); @@ -1372,7 +1372,7 @@ function handle_LSobject_customAction($request) { 'LSsession_13', array( 'customAction' => $title, - 'function' => ($function?getCallableName($function):_('undefined')) + 'function' => ($function?format_callable($function):_('undefined')) ) ); LSsession :: displayTemplate(); @@ -1460,9 +1460,9 @@ LSurl :: add_handler('#^object/(?P[^/]+)/(?P[^/]+)/customAction/(? /* * Handle old custom_action.php request for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_custom_action_php($request) { if (!isset($_GET['LSobject']) || !isset($_GET['dn']) || !isset($_GET['customAction'])) @@ -1495,9 +1495,9 @@ LSurl :: add_handler('#^custom_action\.php#', 'handle_old_custom_action_php', fa /* * Handle LSaddon view request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_addon_view($request) { if (LSsession ::loadLSaddon($request -> LSaddon)) { @@ -1516,9 +1516,9 @@ LSurl :: add_handler('#^addon/(?P[^/]+)/(?P[^/]+)$#', 'handle_add /* * Handle LSaddon view request old-URL for retro-compatibility * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_old_addon_view($request) { if ((isset($_GET['LSaddon'])) && (isset($_GET['view']))) { @@ -1541,11 +1541,11 @@ LSurl :: add_handler('#^addon_view\.php#', 'handle_old_addon_view', false); * * See get_LSobject_from_request() for details. * - * @param[in] $request LSurlRequest The request - * @param[in] $instanciate boolean Instanciate and return an object (optional, default: true) - * @param[in] $check_access callable|null Permit to specify check access method (optional, default: see get_LSobject_from_request()) + * @param LSurlRequest $request The request + * @param boolean $instanciate Instanciate and return an object (optional, default: true) + * @param callable|null $check_access Permit to specify check access method (optional, default: see get_LSobject_from_request()) * - * @retval LSobject|boolean The instanciated LSobject (or True if $instanciate=false), or False + * @return LSobject|boolean The instanciated LSobject (or True if $instanciate=false), or False * on error/access refused */ function get_LSobject_from_API_request($request, $instanciate=true, $check_access=null) { @@ -1555,9 +1555,9 @@ function get_LSobject_from_API_request($request, $instanciate=true, $check_acces /* * Handle API LSobject search * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_search($request) { $object = get_LSobject_from_API_request($request); @@ -1699,9 +1699,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/?$#', 'handle_api_LSo /* * Handle API LSobject create request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_create($request) { $object = get_LSobject_from_API_request( @@ -1745,9 +1745,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/create/?$#', 'handle_ /* * Handle API LSobject import request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_import($request) { $object = get_LSobject_from_API_request($request, true); @@ -1788,9 +1788,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/import/?$#', 'handle_ /* * Handle API LSobject export request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_export($request) { $object = get_LSobject_from_API_request($request, true); @@ -1828,9 +1828,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/export/?$#', 'handle_ /* * Handle API LSobject show request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_show($request) { $object = get_LSobject_from_API_request($request); @@ -1874,9 +1874,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/?(?P[^/]+)/?$#', /* * Handle API LSobject modify request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_modify($request) { $object = get_LSobject_from_API_request( @@ -1922,9 +1922,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/(?P[^/]+)/modify/ /* * Handle API LSobject remove request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_remove($request) { $object = get_LSobject_from_API_request( @@ -1957,9 +1957,9 @@ LSurl :: add_handler('#^api/1.0/object/(?P[^/]+)/(?P[^/]+)/remove/ /* * Handle API LSobject relation request * - * @param[in] $request LSurlRequest The request + * @param LSurlRequest $request The request * - * @retval void + * @return void **/ function handle_api_LSobject_relation($request) { $object = get_LSobject_from_API_request(