public static function createFromFile(\SplFileInfo $file_info)
    {
        $contents = file_get_contents($file_info);

        if (!$contents) {
            throw new \RuntimeException(
                sprintf(
                    'Unable to retrieve contents from file (%s).',
                    $file_info->getRealPath()
                )
            );
        }

        return self::createFromString($contents);
    }
public static function createFromFile(\SplFileInfo $file_info)
    {
        $contents = file_get_contents($file_info);

        if (!$contents) {
            throw new \RuntimeException(
                sprintf(
                    'Unable to retrieve contents from file (%s).',
                    $file_info->getRealPath()
                )
            );
        }

        return self::createFromString($contents);
    }
public static function createFromFile ( \ SplFileInfo $ file_info ) { $ contents = file_get_contents ( $ file_info ) ; if ( ! $ contents ) { throw new \ RuntimeException ( sprintf ( 'Unable to retrieve contents from file (%s).' , $ file_info -> getRealPath ( ) ) ) ; } return self :: createFromString ( $ contents ) ; }
Create configuration object from file.

@param \SplFileInfo $file_info

@return self
Create configuration object from file .