2017 © Pedro PelĂĄez
 

symfony-bundle ftp-bundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

image

isidrogg/ftp-bundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  • Thursday, November 27, 2014
  • by isidrogg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more "classy" way., (*1)

Build Status, (*2)

Installation

Step 1: Install the bundle

For Symfony 2.0:

Add the following entries to the deps in the root of your project file:, (*3)

[IjankiFtpBundle]
    git=git://github.com/isidrogg/FtpBundle.git
    target=bundles/isidrogg/Bundle/FtpBundle

Now, run the vendors script to download the bundle:, (*4)

``` bash $ php bin/vendors install, (*5)


Then you need to add the Ijanki namespace to your autoloader: ``` php <?php // app/autoload.php $loader->registerNamespaces(array( // ... 'Ijanki' => __DIR__.'/../vendor/bundles', ));

For Symfony >= 2.1

Add the following dependency to your composer.json file:, (*6)

"require": {
    # ..
    "isidrogg/ftp-bundle": "*"
    # ..
}

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:, (*7)

``` php <?php // app/AppKernel.php, (*8)

public function registerBundles() { $bundles = array( // ... new Isidrogg\Bundle\FtpBundle\IsidroggFtpBundle(), ); }, (*9)


## Usage ``` php <?php use Isidrogg\Bundle\FtpBundle\Exception\FtpException; public function indexAction() { //... try { $ftp = $this->container->get('isidrogg_ftp'); $ftp->connect($host); $ftp->login($username, $password); $ftp->put($destination_file, $source_file, FTP_BINARY); } catch (FtpException $e) { echo 'Error: ', $e->getMessage(); } //... }

All php ftp functions are wrapped in Ftp object:, (*10)

For example:
ftp_mkdir becomes $ftp->mkdir or
ftp_put becomes $ftp->put
with the same arguments except the first one (resource $ftp_stream).

Check Ftp.php for other added methods., (*11)

Credits

Inspired by https://github.com/dg/ftp-php, (*12)

The Versions

27/11 2014

dev-master

9999999-dev https://github.com/isidrogg/FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

by Isidro GarcĂ­a

ftp

04/06 2013

v0.9.2

0.9.2.0 https://github.com/iJanki/FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

ftp

04/06 2013

v1.0.0

1.0.0.0 https://github.com/iJanki/FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

ftp

19/07 2012

v0.9.1

0.9.1.0 https://github.com/iJanki/FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

ftp

19/07 2012

v0.9

0.9.0.0 https://github.com/iJanki/FtpBundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

ftp