| 1 | <?php |
||
| 11 | class TraitDefinition extends ParentDefinition |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $filepath; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var Stmt\Trait_ |
||
| 20 | */ |
||
| 21 | private $statement; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var ClassMethod[] |
||
| 25 | */ |
||
| 26 | private $methods; |
||
| 27 | |||
| 28 | public function __construct($name, Stmt\Trait_ $statement) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Compile the definition |
||
| 36 | * |
||
| 37 | * @param Context $context |
||
| 38 | * @return boolean |
||
| 39 | */ |
||
| 40 | public function compile(Context $context) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getFilepath() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $filepath |
||
| 55 | */ |
||
| 56 | public function setFilepath($filepath) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return bool |
||
| 63 | */ |
||
| 64 | public function precompile() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @param $method |
||
| 77 | */ |
||
| 78 | public function addMethod($method) |
||
| 82 | } |
||
| 83 |