| @@ 51-60 (lines=10) @@ | ||
| 48 | * @return mixed |
|
| 49 | * @throws Exception |
|
| 50 | */ |
|
| 51 | public function __get( $property ) |
|
| 52 | { |
|
| 53 | switch( $property ) { |
|
| 54 | case 'args'; |
|
| 55 | case 'dependencies'; |
|
| 56 | case 'fields'; |
|
| 57 | return $this->$property; |
|
| 58 | } |
|
| 59 | throw new Exception( sprintf( 'Invalid %s property: %s', __CLASS__, $property )); |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @param string $property |
|
| @@ 69-80 (lines=12) @@ | ||
| 66 | * @return void |
|
| 67 | * @throws Exception |
|
| 68 | */ |
|
| 69 | public function __set( $property, $value ) |
|
| 70 | { |
|
| 71 | switch( $property ) { |
|
| 72 | case 'args': |
|
| 73 | case 'dependencies': |
|
| 74 | case 'fields': |
|
| 75 | $this->$property = $value; |
|
| 76 | break; |
|
| 77 | default: |
|
| 78 | throw new Exception( sprintf( 'Invalid %s property: %s', __CLASS__, $property )); |
|
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * Add a field to the form |
|