CAdvBanner::makeFileArray: Bitrix method

      
<?php 
//  CAdvBanner :: makeFileArray()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:1928

    
public static function makeFileArray($data$del false$description null$options = array())
    {
        
$emptyFile = array(
            
"name" => null,
            
"type" => null,
            
"tmp_name" => null,
            
"error" => 4,
            
"size" => 0,
        );

        if (
$del)
        {
            
$result $emptyFile;
            
$result["del"] = "Y";
        }
        elseif (
is_null($data))
        {
            
$result $emptyFile;
        }
        elseif (
is_numeric($data))
        {
            
$result self::makeFileArrayFromId($data$description$options);
            if (
$result === false)
                
$result $emptyFile;
        }
        elseif (
is_string($data))
        {
            
$result self::makeFileArrayFromPath($data$description$options);
            if (
$result === false)
                
$result $emptyFile;
        }
        elseif (
is_array($data))
        {
            
$result self::makeFileArrayFromArray($data$description$options);
            if (
$result === false)
                
$result $emptyFile;
        }
        else
        {
            
$result $emptyFile;
        }

        return 
$result;
    }