source-class-Com.Tecnick.Pdf.Page.Mode

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 
<?php
/**
 * Mode.php
 *
 * @since       2011-05-23
 * @category    Library
 * @package     PdfPage
 * @author      Nicola Asuni <info@tecnick.com>
 * @copyright   2011-2015 Nicola Asuni - Tecnick.com LTD
 * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 * @link        https://github.com/tecnickcom/tc-lib-pdf-page
 *
 * This file is part of tc-lib-pdf-page software library.
 */

namespace Com\Tecnick\Pdf\Page;

/**
 * Com\Tecnick\Pdf\Page\Mode
 *
 * @since       2011-05-23
 * @category    Library
 * @package     PdfPage
 * @author      Nicola Asuni <info@tecnick.com>
 * @copyright   2011-2015 Nicola Asuni - Tecnick.com LTD
 * @license     http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)
 * @link        https://github.com/tecnickcom/tc-lib-pdf-page
 */
abstract class Mode extends \Com\Tecnick\Pdf\Page\Format
{
    /**
     * Map layouts with their canonical names
     *
     * @var array
     */
    protected static $layout = array(
        'singlepage'     => 'SinglePage',     // Display one page at a time
        'default'        => 'SinglePage',
        'single'         => 'SinglePage',
        'onecolumn'      => 'OneColumn',      // Display the pages in one column
        'continuous'     => 'OneColumn',
        'twocolumnleft'  => 'TwoColumnLeft',  // Display the pages in two columns, with odd-numbered pages on the left
        'two'            => 'TwoColumnLeft',
        'twocolumnright' => 'TwoColumnRight', // Display the pages in two columns, with odd-numbered pages on the right
        'twopageleft'    => 'TwoPageLeft',    // Display the pages two at a time, with odd-numbered pages on the left
        'twopageright'   => 'TwoPageRight'    // Display the pages two at a time, with odd-numbered pages on the right
    );

    /**
     * Map display modes with their canonical names
     *
     * @var array
     */
    protected static $display = array(
        'usenone'        => 'UseNone',        // Neither document outline nor thumbnail images visible
        'useoutlines'    => 'UseOutlines',    // Document outline visible
        'usethumbs'      => 'UseThumbs',      // Thumbnail images visible
        'fullscreen'     => 'FullScreen',     // Full-screen mode, with no menu bar or window controls
        'useoc'          => 'UseOC',          // (PDF 1.5) Optional content group panel visible
        'useattachments' => 'UseAttachments', // (PDF 1.6) Attachments panel visible
        ''               => 'UseAttachments'  // (PDF 1.6) Attachments panel visible
    );
    
    /**
     * Get the canonical page layout name.
     *
     * @param string $name Page layout name
     *
     * @return string Canonical page layout name.
     */
    public function getLayout($name = '')
    {
        $name = strtolower($name);
        if (isset(self::$layout[$name])) {
            return self::$layout[$name];
        }
        return 'SinglePage';
    }

    /**
     * Get the canonical page display mode.
     *
     * @param string $mode A name object specifying how the document should be displayed when opened.
     *
     * @return string Canonical page display mode
     */
    public function getDisplay($mode = '')
    {
        $mode = strtolower($mode);
        if (isset(self::$display[$mode])) {
            return self::$display[$mode];
        }
        return 'UseNone';
    }
}
 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy