本文整理汇总了PHP中CKFinder_Connector_Utils_Misc::booleanValue方法的典型用法代码示例。如果您正苦于以下问题:PHP CKFinder_Connector_Utils_Misc::booleanValue方法的具体用法?PHP CKFinder_Connector_Utils_Misc::booleanValue怎么用?PHP CKFinder_Connector_Utils_Misc::booleanValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKFinder_Connector_Utils_Misc
的用法示例。
在下文中一共展示了CKFinder_Connector_Utils_Misc::booleanValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($thumbnailsNode)
{
if (extension_loaded('gd') && isset($thumbnailsNode['enabled'])) {
$this->_isEnabled = CKFinder_Connector_Utils_Misc::booleanValue($thumbnailsNode['enabled']);
}
if (isset($thumbnailsNode['maxWidth'])) {
$_maxWidth = intval($thumbnailsNode['maxWidth']);
if ($_maxWidth >= 0) {
$this->_maxWidth = $_maxWidth;
}
}
if (isset($thumbnailsNode['maxHeight'])) {
$_maxHeight = intval($thumbnailsNode['maxHeight']);
if ($_maxHeight >= 0) {
$this->_maxHeight = $_maxHeight;
}
}
if (isset($thumbnailsNode['quality'])) {
$_quality = intval($thumbnailsNode['quality']);
if ($_quality > 0 && $_quality <= 100) {
$this->_quality = $_quality;
}
}
if (isset($thumbnailsNode['url'])) {
$this->_url = $thumbnailsNode['url'];
}
if (isset($thumbnailsNode['directory'])) {
$this->_directory = $thumbnailsNode['directory'];
}
}
示例2: __construct
function __construct($accessControlNodes)
{
foreach ($accessControlNodes as $node) {
$_folderView = isset($node['folderView']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['folderView']) : false;
$_folderCreate = isset($node['folderCreate']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['folderCreate']) : false;
$_folderRename = isset($node['folderRename']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['folderRename']) : false;
$_folderDelete = isset($node['folderDelete']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['folderDelete']) : false;
$_fileView = isset($node['fileView']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['fileView']) : false;
$_fileUpload = isset($node['fileUpload']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['fileUpload']) : false;
$_fileRename = isset($node['fileRename']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['fileRename']) : false;
$_fileDelete = isset($node['fileDelete']) ? CKFinder_Connector_Utils_Misc::booleanValue($node['fileDelete']) : false;
$_role = isset($node['role']) ? $node['role'] : "*";
$_resourceType = isset($node['resourceType']) ? $node['resourceType'] : "*";
$_folder = isset($node['folder']) ? $node['folder'] : "/";
$this->addACLEntry($_role, $_resourceType, $_folder, array($_folderView ? CKFINDER_CONNECTOR_ACL_FOLDER_VIEW : 0, $_folderCreate ? CKFINDER_CONNECTOR_ACL_FOLDER_CREATE : 0, $_folderRename ? CKFINDER_CONNECTOR_ACL_FOLDER_RENAME : 0, $_folderDelete ? CKFINDER_CONNECTOR_ACL_FOLDER_DELETE : 0, $_fileView ? CKFINDER_CONNECTOR_ACL_FILE_VIEW : 0, $_fileUpload ? CKFINDER_CONNECTOR_ACL_FILE_UPLOAD : 0, $_fileRename ? CKFINDER_CONNECTOR_ACL_FILE_RENAME : 0, $_fileDelete ? CKFINDER_CONNECTOR_ACL_FILE_DELETE : 0), array($_folderView ? 0 : CKFINDER_CONNECTOR_ACL_FOLDER_VIEW, $_folderCreate ? 0 : CKFINDER_CONNECTOR_ACL_FOLDER_CREATE, $_folderRename ? 0 : CKFINDER_CONNECTOR_ACL_FOLDER_RENAME, $_folderDelete ? 0 : CKFINDER_CONNECTOR_ACL_FOLDER_DELETE, $_fileView ? 0 : CKFINDER_CONNECTOR_ACL_FILE_VIEW, $_fileUpload ? 0 : CKFINDER_CONNECTOR_ACL_FILE_UPLOAD, $_fileRename ? 0 : CKFINDER_CONNECTOR_ACL_FILE_RENAME, $_fileDelete ? 0 : CKFINDER_CONNECTOR_ACL_FILE_DELETE));
}
}
示例3: CKFinder_Connector_Core_ThumbnailsConfig
function CKFinder_Connector_Core_ThumbnailsConfig($thumbnailsNode)
{
if (extension_loaded('gd') && isset($thumbnailsNode['enabled'])) {
$this->_isEnabled = CKFinder_Connector_Utils_Misc::booleanValue($thumbnailsNode['enabled']);
}
if (isset($thumbnailsNode['directAccess'])) {
$this->_directAccess = CKFinder_Connector_Utils_Misc::booleanValue($thumbnailsNode['directAccess']);
}
if (isset($thumbnailsNode['bmpSupported'])) {
$this->_bmpSupported = CKFinder_Connector_Utils_Misc::booleanValue($thumbnailsNode['bmpSupported']);
}
if (isset($thumbnailsNode['maxWidth'])) {
$_maxWidth = intval($thumbnailsNode['maxWidth']);
if ($_maxWidth >= 0) {
$this->_maxWidth = $_maxWidth;
}
}
if (isset($thumbnailsNode['maxHeight'])) {
$_maxHeight = intval($thumbnailsNode['maxHeight']);
if ($_maxHeight >= 0) {
$this->_maxHeight = $_maxHeight;
}
}
if (isset($thumbnailsNode['quality'])) {
$_quality = intval($thumbnailsNode['quality']);
if ($_quality > 0 && $_quality <= 100) {
$this->_quality = $_quality;
}
}
if (isset($thumbnailsNode['url'])) {
$this->_url = $thumbnailsNode['url'];
}
if (!strlen($this->_url)) {
$this->_url = "/";
} else {
if (substr($this->_url, -1, 1) != "/") {
$this->_url .= "/";
}
}
if (isset($thumbnailsNode['directory'])) {
$this->_directory = $thumbnailsNode['directory'];
}
}
示例4: loadValues
/**
* Load values from config
*
* @access private
*/
private function loadValues()
{
if (function_exists('CheckAuthentication')) {
$this->_isEnabled = CheckAuthentication();
}
if (isset($GLOBALS['config']['LicenseName'])) {
$this->_licenseName = (string) $GLOBALS['config']['LicenseName'];
}
if (isset($GLOBALS['config']['LicenseKey'])) {
$this->_licenseKey = (string) $GLOBALS['config']['LicenseKey'];
}
if (isset($GLOBALS['config']['FilesystemEncoding'])) {
$this->_filesystemEncoding = (string) $GLOBALS['config']['FilesystemEncoding'];
}
if (isset($GLOBALS['config']['RoleSessionVar'])) {
$this->_roleSessionVar = (string) $GLOBALS['config']['RoleSessionVar'];
}
if (isset($GLOBALS['config']['CheckDoubleExtension'])) {
$this->_checkDoubleExtension = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['CheckDoubleExtension']);
}
if (isset($GLOBALS['config']['DisallowUnsafeCharacters'])) {
$this->_disallowUnsafeCharacters = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['DisallowUnsafeCharacters']);
}
if (isset($GLOBALS['config']['SecureImageUploads'])) {
$this->_secureImageUploads = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['SecureImageUploads']);
}
if (isset($GLOBALS['config']['CheckSizeAfterScaling'])) {
$this->_checkSizeAfterScaling = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['CheckSizeAfterScaling']);
}
if (isset($GLOBALS['config']['ForceAscii'])) {
$this->_forceAscii = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['ForceAscii']);
}
if (isset($GLOBALS['config']['HtmlExtensions'])) {
$this->_htmlExtensions = (array) $GLOBALS['config']['HtmlExtensions'];
}
if (isset($GLOBALS['config']['HideFolders'])) {
$this->_hideFolders = (array) $GLOBALS['config']['HideFolders'];
}
if (isset($GLOBALS['config']['HideFiles'])) {
$this->_hideFiles = (array) $GLOBALS['config']['HideFiles'];
}
if (isset($GLOBALS['config']['ChmodFiles'])) {
$this->_chmodFiles = $GLOBALS['config']['ChmodFiles'];
}
if (isset($GLOBALS['config']['ChmodFolders'])) {
$this->_chmodFolders = $GLOBALS['config']['ChmodFolders'];
}
if (isset($GLOBALS['config']['DefaultResourceTypes'])) {
$_defaultResourceTypes = (string) $GLOBALS['config']['DefaultResourceTypes'];
if (strlen($_defaultResourceTypes)) {
$this->_defaultResourceTypes = explode(",", $_defaultResourceTypes);
}
}
if (isset($GLOBALS['config']['TempDirectory'])) {
$this->_tempDirectory = $GLOBALS['config']['TempDirectory'];
}
if (isset($GLOBALS['config']['XSendfile'])) {
$this->_xsendfile = CKFinder_Connector_Utils_Misc::booleanValue($GLOBALS['config']['XSendfile']);
}
if (isset($GLOBALS['config']['XSendfileNginx'])) {
$this->_xsendfileNginx = (array) $GLOBALS['config']['XSendfileNginx'];
}
}