Filesystem::read PHP Method

read() public static method

public static read ( $file )
    public static function read($file)
    {
        $file = self::path($file);
        if (self::exists($file)) {
            return file_get_contents($file);
        }
        return null;
    }

Usage Example

Example #1
0
function migrate($migration, $connection)
{
    echo 'importing ' . $migration . '... ';
    $connection->query(utf8_decode(Filesystem::read('db/migrations/' . $migration)));
    $connection->create(array('table' => 'schema_migrations', 'values' => array('version' => get_migration_version($migration))));
    echo 'done' . PHP_EOL;
}
All Usage Examples Of Filesystem::read