Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17116 программистов и 1833 робота. Сейчас ищут 1664 программиста ...
File_HtAccess::setProperties()
Вернуться к: File_HtAccess
File_HtAccess::setProperties()
File_HtAccess::setProperties() – set the values of objects properties
Synopsis
void File_HtAccess::setProperties ( array $params )
Set the values of objects properties as defined by hash given as a parameter. You can use this method as an alternative to passing property values in constructor .
Parameter
-
$params['authname'] - authname
-
$params['authtype'] - authtype
-
$params['authuserfile'] - authuserfile
-
$params['authgroupfile'] - authgroupfile
-
$params['require'] - require
-
$params['additional'] - additional
Return value
void
Note
This function can not be called statically.
Example
Using File_HtAccess::setProperties()
<?php
require_once('File/HtAccess.php');
/* let any valid user access the resource */
$fh = new File_HtAccess('.htaccess');
$params['authname'] = 'Private';
$params['authtype'] = 'Basic';
$params['authuserfile'] = '/path/to/.htpasswd';
$params['authgroupfile'] = '/path/to/.htgroup';
$params['require'] = array('group', 'admins');
$fh->setProperties($params);
?>
Вернуться к: File_HtAccess