src/components/File.php
public function getFile()
    {
        if (!is_object($this->_file)) {
            $this->_file = Yii::createObject(array_merge([
                'class'    => FileObj::class,
                'template' => $this->getTemplate(),
                'goal'     => $this,
                'path'     => $this->_path ?: $this->id,
            ], is_string($this->_file)
                ? ['path' => $this->_file]
                : (array) $this->_file
            ));
        }

        return $this->_file;
    }
public function getFile()
    {
        if (!is_object($this->_file)) {
            $this->_file = Yii::createObject(array_merge([
                'class'    => FileObj::class,
                'template' => $this->getTemplate(),
                'goal'     => $this,
                'path'     => $this->_path ?: $this->id,
            ], is_string($this->_file)
                ? ['path' => $this->_file]
                : (array) $this->_file
            ));
        }

        return $this->_file;
    }
public function getFile ( ) { if ( ! is_object ( $ this -> _file ) ) { $ this -> _file = Yii :: createObject ( array_merge ( [ 'class' => FileObj :: class , 'template' => $ this -> getTemplate ( ) , 'goal' => $ this , 'path' => $ this -> _path ? : $ this -> id , ] , is_string ( $ this -> _file ) ? [ 'path' => $ this -> _file ] : ( array ) $ this -> _file ) ) ; } return $ this -> _file ; }
Returns the file object.
Instantiates it if necessary.
@return FileObj
Returns the file object . Instantiates it if necessary .