1 | <?php |
||
18 | abstract class AbstractPurchase extends \hipanel\base\Model |
||
19 | { |
||
20 | use \hipanel\base\ModelTrait; |
||
21 | |||
22 | /** |
||
23 | * @var AbstractCartPosition |
||
24 | */ |
||
25 | public $position; |
||
26 | |||
27 | /** |
||
28 | * @var array result of purchase execution |
||
29 | */ |
||
30 | protected $_result; |
||
31 | |||
32 | public function getResult() |
||
36 | |||
37 | /** {@inheritdoc} */ |
||
38 | public static function tableName() |
||
39 | { |
||
40 | throw new InvalidConfigException('Method "tableName" must be declared'); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @var string operation to be performed, e.g.: Renew, Transfer, Registration |
||
45 | */ |
||
46 | public static function operation() |
||
50 | |||
51 | /** {@inheritdoc} */ |
||
52 | public function init() |
||
59 | |||
60 | /** |
||
61 | * Executes the purchase. |
||
62 | * Calls proper API commands to purchase the product. |
||
63 | * @throws ErrorPurchaseException in case of failed purchase |
||
64 | * @return true if the item was purchased successfully |
||
65 | */ |
||
66 | public function execute() |
||
75 | |||
76 | public function renderNotes() |
||
80 | |||
81 | /** {@inheritdoc} */ |
||
82 | public function rules() |
||
89 | } |
||
90 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.