View file vendor/robmorgan/phinx/src/Phinx/Db/Action/RenameTable.php

File size: 798B
  1. <?php
  2.  
  3. /**
  4. * MIT License
  5. * For full license information, please view the LICENSE file that was distributed with this source code.
  6. */
  7.  
  8. namespace Phinx\Db\Action;
  9.  
  10. use Phinx\Db\Table\Table;
  11.  
  12. class RenameTable extends Action
  13. {
  14. /**
  15. * The new name for the table
  16. *
  17. * @var string
  18. */
  19. protected $newName;
  20.  
  21. /**
  22. * Constructor
  23. *
  24. * @param \Phinx\Db\Table\Table $table The table to be renamed
  25. * @param mixed $newName The new name for the table
  26. */
  27. public function __construct(Table $table, $newName)
  28. {
  29. parent::__construct($table);
  30. $this->newName = $newName;
  31. }
  32.  
  33. /**
  34. * Return the new name for the table
  35. *
  36. * @return string
  37. */
  38. public function getNewName()
  39. {
  40. return $this->newName;
  41. }
  42. }