common/models/resources/File.php
public static function loadFile( $file, $name ) {

		if( !isset( $file ) ) {

			$file	= new File();
		}

		$file->load( Yii::$app->request->post(), $name );

		return $file;
	}
public static function loadFile( $file, $name ) {

		if( !isset( $file ) ) {

			$file	= new File();
		}

		$file->load( Yii::$app->request->post(), $name );

		return $file;
	}
public static function loadFile ( $ file , $ name ) { if ( ! isset ( $ file ) ) { $ file = new File ( ) ; } $ file -> load ( Yii :: $ app -> request -> post ( ) , $ name ) ; return $ file ; }
Load the file attributes submitted by form and return the updated file model.

@param File $file
@param string $name
@return File - after loading from request url
Load the file attributes submitted by form and return the updated file model .