2017 © Pedro Peláez
 

library azure-file-service

File Service for Microsoft Azure SDK for PHP

image

lnc/azure-file-service

File Service for Microsoft Azure SDK for PHP

  • Thursday, June 8, 2017
  • by jancinert
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,053 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 37 % Grown

The README.md

lnc-azureFileService

File Service for Microsoft Azure SDK for PHP, (*1)

Getting Started

Install via Composer

  1. Create a file named composer.json in the root of your project and add the following code to it:
{
  "require": {
    "lnc/azure-file-service": "^0"
  },
  "repositories":      [
    {
      "type": "pear",
      "url":  "http://pear.php.net"
    }
  ],
  "minimum-stability": "dev"
}

Usage

Getting Started

<?php
    require_once __DIR__ . '/vendor/autoload.php';
    use WindowsFileService\Common\ServicesBuilder;
    use WindowsFileService\Facade;

    $accountName = '';
    $accountKey  = '';
    $isSecure    = true;

    $connectionString = sprintf(
            'DefaultEndpointsProtocol=%s;AccountName=%s;AccountKey=%s',
            $isSecure
                    ? 'https'
                    : 'http',
            $accountName,
            $accountKey
    );

### USING FACADE    

    $result = new Facade( $connectionString );
    $result->uploadFile(
           'test',
           'test',
           'test.dat',
           '/home/test.dat'
    );

### DIRECTLY            

    $fileRestProxy = ServicesBuilder::getInstance()
                                    ->createFileService( $connectionString );


    $result = $fileRestProxy->createShare(
                                'test'
    );

    $result = $fileRestProxy->createDirectory(
                                'test',
                                'test'
    );

    $result = $fileRestProxy->createFile(
                            'test',
                            'test',
                            'test.txt',
                            4
    );

    $result = $fileRestProxy->createFileContents(
                                'test',
                                'test',
                                'test.txt',
                                'test'
    );

    OR

    $result = $fileRestProxy->createFileRange(
                            'test',
                            'test',
                            'test.txt',
                            new \WindowsFileService\File\Models\FileRange( 0, 3 ),
                            'test'
    );

The Versions

08/06 2017

dev-master

9999999-dev

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

10/02 2016

0.0.7

0.0.7.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

19/01 2016

0.0.6

0.0.6.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

12/01 2016

0.0.5

0.0.5.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

25/10 2015

0.0.4

0.0.4.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

25/10 2015

0.0.3

0.0.3.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

25/10 2015

0.0.2

0.0.2.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert

25/10 2015

0.0.1

0.0.1.0

File Service for Microsoft Azure SDK for PHP

  Sources   Download

The Requires

 

by Jan Cinert