WorkflowTemplateTable :: getFromSerializedForm: Bitrix method

      
<?php 
//  Bitrix\Bizproc\Workflow\Template\Entity\WorkflowTemplateTable :: getFromSerializedForm()
//  /dist/bitrix/modules/bizproc/lib/workflow/template/entity/workflowtemplate.php:95

    
public static function getFromSerializedForm($value)
    {
        static 
$useCompression;
        if (
$useCompression === null)
        {
            
$useCompression = \CBPWorkflowTemplateLoader::useGZipCompression();
        }

        if (
strlen($value) > 0)
        {
            if (
$useCompression)
            {
                
$value1 = @gzuncompress($value);
                if (
$value1 !== false)
                    
$value $value1;
            }

            
$value unserialize($value);
            if (!
is_array($value))
                
$value = array();
        }
        else
        {
            
$value = array();
        }
        return 
$value;
    }