Вход Регистрация
Файл: concrete5.7.5.6/concrete/vendor/zendframework/zend-serializer/src/Adapter/JsonOptions.php
Строк: 96
<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace ZendSerializerAdapter;

use 
ZendJsonJson as ZendJson;
use 
ZendSerializerException;

class 
JsonOptions extends AdapterOptions
{
    
/**
     * @var int
     */
    
protected $cycleCheck false;

    protected 
$enableJsonExprFinder false;

    protected 
$objectDecodeType ZendJson::TYPE_ARRAY;

    
/**
     * @param  bool $flag
     * @return JsonOptions
     */
    
public function setCycleCheck($flag)
    {
        
$this->cycleCheck = (bool) $flag;
        return 
$this;
    }

    
/**
     * @return bool
     */
    
public function getCycleCheck()
    {
        return 
$this->cycleCheck;
    }

    
/**
     * @param  bool $flag
     * @return JsonOptions
     */
    
public function setEnableJsonExprFinder($flag)
    {
        
$this->enableJsonExprFinder = (bool) $flag;
        return 
$this;
    }

    
/**
     * @return bool
     */
    
public function getEnableJsonExprFinder()
    {
        return 
$this->enableJsonExprFinder;
    }

    
/**
     * @param  int $type
     * @return JsonOptions
     * @throws ExceptionInvalidArgumentException
     */
    
public function setObjectDecodeType($type)
    {
        if (
$type != ZendJson::TYPE_ARRAY && $type != ZendJson::TYPE_OBJECT) {
            throw new 
ExceptionInvalidArgumentException(
                
'Unknown decode type: ' $type
            
);
        }

        
$this->objectDecodeType = (int) $type;

        return 
$this;
    }

    
/**
     * @return int
     */
    
public function getObjectDecodeType()
    {
        return 
$this->objectDecodeType;
    }
}
Онлайн: 0
Реклама