Guest User

Untitled

a guest
Apr 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2. require_once 'Zend/Image/Action/ActionAbstract.php';
  3. require_once 'Zend/Image/Point.php';
  4.  
  5. // this is NOT ZF's class
  6. class Zend_Image_Action_ResizeProportionally extends Zend_Image_Action_ActionAbstract
  7. {
  8. const NAME = 'ResizeProportionally';
  9.  
  10. protected $_colomn;
  11. protected $_rows;
  12.  
  13. public function __construct(array $options = array())
  14. {
  15. foreach($options as $key => $value) {
  16. switch($key) {
  17. case 'colomn':
  18. $this->setColomn($value);
  19. break;
  20. case 'rows':
  21. $this->setRows($value);
  22. break;
  23. }
  24. }
  25. }
  26.  
  27. public function setColomn($value)
  28. {
  29. $this->_colomn = $value;
  30. }
  31.  
  32. public function getColomn()
  33. {
  34. return $this->_colomn;
  35. }
  36.  
  37. public function setRows($value)
  38. {
  39. $this->_rows = $value;
  40. }
  41.  
  42. public function getRows()
  43. {
  44. return $this->_rows;
  45. }
  46.  
  47. public function getName()
  48. {
  49. return self::NAME;
  50. }
  51. }
Add Comment
Please, Sign In to add comment