CodeGeneratorInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Code\Generator;
  7. /**
  8. * Interface \Magento\Framework\Code\Generator\CodeGeneratorInterface
  9. *
  10. */
  11. interface CodeGeneratorInterface extends \Zend\Code\Generator\GeneratorInterface
  12. {
  13. /**
  14. * Set class name.
  15. *
  16. * @param string $name
  17. * @return $this
  18. */
  19. public function setName($name);
  20. /**
  21. * Set class doc block.
  22. *
  23. * @param array $docBlock
  24. * @return $this
  25. */
  26. public function setClassDocBlock(array $docBlock);
  27. /**
  28. * Add a list of properties.
  29. *
  30. * @param array $properties
  31. * @return $this
  32. */
  33. public function addProperties(array $properties);
  34. /**
  35. * Add a list of methods.
  36. *
  37. * @param array $methods
  38. * @return $this
  39. */
  40. public function addMethods(array $methods);
  41. /**
  42. * Set extended class.
  43. *
  44. * @param string $extendedClass
  45. * @return $this
  46. */
  47. public function setExtendedClass($extendedClass);
  48. /**
  49. * Set a list of implemented interfaces.
  50. *
  51. * @param array $interfaces
  52. * @return $this
  53. */
  54. public function setImplementedInterfaces(array $interfaces);
  55. /**
  56. * Add a trait to the class.
  57. *
  58. * @param string $trait
  59. * @return $this
  60. */
  61. public function addTrait($trait);
  62. }