PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Zend/Service/WindowsAzure/CommandLine/Scaffolders/DefaultScaffolder/index.php

https://bitbucket.org/simukti/zf1
PHP | 63 lines | 22 code | 5 blank | 36 comment | 1 complexity | 0636ebecee4829944085a86cc9253370 MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service_WindowsAzure
  17. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. /**
  22. * @category Zend
  23. * @package Zend_Service_WindowsAzure_CommandLine
  24. * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  25. * @license http://framework.zend.com/license/new-bsd New BSD License
  26. */
  27. class Scaffolder
  28. extends Zend_Service_WindowsAzure_CommandLine_PackageScaffolder_PackageScaffolderAbstract
  29. {
  30. /**
  31. * Invokes the scaffolder.
  32. *
  33. * @param Phar $phar Phar archive containing the current scaffolder.
  34. * @param string $root Path Root path.
  35. * @param array $options Options array (key/value).
  36. */
  37. public function invoke(Phar $phar, $rootPath, $options = array())
  38. {
  39. // Check required parameters
  40. if (empty($options['DiagnosticsConnectionString'])) {
  41. require_once 'Zend/Service/Console/Exception.php';
  42. throw new Zend_Service_Console_Exception('Missing argument for scaffolder: DiagnosticsConnectionString');
  43. }
  44. // Extract to disk
  45. $this->log('Extracting resources...');
  46. $this->createDirectory($rootPath);
  47. $this->extractResources($phar, $rootPath);
  48. $this->log('Extracted resources.');
  49. // Apply transforms
  50. $this->log('Applying transforms...');
  51. $this->applyTransforms($rootPath, $options);
  52. $this->log('Applied transforms.');
  53. // Show "to do" message
  54. $contentRoot = realpath($rootPath . '/PhpOnAzure.Web');
  55. echo "\r\n";
  56. echo "Note: before packaging your application, please copy your application code to $contentRoot";
  57. }
  58. }