PHP 8.1.33
Preview: ImagesConfig.php Size: 2.52 KB
/home/jambtst2015/public_html/ckfinder/core/connector/php/php4/Core/ImagesConfig.php

<?php

/*

 * CKFinder

 * ========

 * http://ckfinder.com

 * Copyright (C) 2007-2011, CKSource - Frederico Knabben. All rights reserved.

 *

 * The software, this file and its contents are subject to the CKFinder

 * License. Please read the license.txt file before using, installing, copying,

 * modifying or distribute this file or part of its contents. The contents of

 * this file is part of the Source Code of CKFinder.

 */

if (!defined('IN_CKFINDER')) exit;



/**

 * @package CKFinder

 * @subpackage Config

 * @copyright CKSource - Frederico Knabben

 */



/**

 * This class keeps images configuration

 *

 * @package CKFinder

 * @subpackage Config

 * @copyright CKSource - Frederico Knabben

 */

class CKFinder_Connector_Core_ImagesConfig

{

    /**

     * Max width for images, 0 to disable resizing

     *

     * @var int

     * @access private

     */

    var $_maxWidth = 0;

    /**

     * Max height for images, 0 to disable resizing

     *

     * @var int

     * @access private

     */

    var $_maxHeight = 0;

    /**

     * Quality of thumbnails

     *

     * @var int

     * @access private

     */

    var $_quality = 80;



    function CKFinder_Connector_Core_ImagesConfig($imagesNode)

    {

        if(isset($imagesNode['maxWidth'])) {

            $_maxWidth = intval($imagesNode['maxWidth']);

            if($_maxWidth>=0) {

                $this->_maxWidth = $_maxWidth;

            }

        }

        if(isset($imagesNode['maxHeight'])) {

            $_maxHeight = intval($imagesNode['maxHeight']);

            if($_maxHeight>=0) {

                $this->_maxHeight = $_maxHeight;

            }

        }

        if(isset($imagesNode['quality'])) {

            $_quality = intval($imagesNode['quality']);

            if($_quality>0 && $_quality<=100) {

                $this->_quality = $_quality;

            }

        }

    }



    /**

     * Get maximum width of a thumbnail

     *

     * @access public

     * @return int

     */

    function getMaxWidth()

    {

    	return $this->_maxWidth;

    }



    /**

     * Get maximum height of a thumbnail

     *

     * @access public

     * @return int

     */

    function getMaxHeight()

    {

    	return $this->_maxHeight;

    }



    /**

     * Get quality of a thumbnail (1-100)

     *

     * @access public

     * @return int

     */

    function getQuality()

    {

    	return $this->_quality;

    }

}

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
8.32 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
14.30 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.57 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
2.59 KB lrw-r--r-- 2025-10-27 23:48:34
Edit Download
1.91 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
7.38 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
6.15 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
2.52 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
1.63 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
9.70 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
5.11 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download
3.48 KB lrw-r--r-- 2024-11-22 17:53:11
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).