1 | <?php |
||
30 | class Node extends Model |
||
31 | { |
||
32 | /** |
||
33 | * The table associated with the model. |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | protected $table = 'nodes'; |
||
38 | |||
39 | /** |
||
40 | * The attributes excluded from the model's JSON form. |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $hidden = ['daemonSecret']; |
||
45 | |||
46 | /** |
||
47 | * Cast values to correct type. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $casts = [ |
||
52 | 'public' => 'integer', |
||
53 | 'location' => 'integer', |
||
54 | 'memory' => 'integer', |
||
55 | 'disk' => 'integer', |
||
56 | 'daemonListen' => 'integer', |
||
57 | 'daemonSFTP' => 'integer', |
||
58 | ]; |
||
59 | |||
60 | /** |
||
61 | * Fields that are not mass assignable. |
||
62 | * |
||
63 | * @var array |
||
64 | */ |
||
65 | protected $guarded = ['id', 'created_at', 'updated_at']; |
||
66 | |||
67 | /** |
||
68 | * @var array |
||
69 | */ |
||
70 | protected static $guzzle = []; |
||
71 | |||
72 | /** |
||
73 | * @var array |
||
74 | */ |
||
75 | protected static $nodes = []; |
||
76 | |||
77 | /** |
||
78 | * Returns an instance of the database object for the requested node ID. |
||
79 | * |
||
80 | * @param int $id |
||
81 | * @return \Illuminate\Database\Eloquent\Model |
||
82 | */ |
||
83 | public static function getByID($id) |
||
95 | |||
96 | /** |
||
97 | * Returns a Guzzle Client for the node in question. |
||
98 | * |
||
99 | * @param int $node |
||
100 | * @return \GuzzleHttp\Client |
||
101 | */ |
||
102 | public static function guzzleRequest($node) |
||
120 | |||
121 | /** |
||
122 | * Returns the configuration in JSON format. |
||
123 | * |
||
124 | * @param bool $pretty Wether to pretty print the JSON or not |
||
125 | * @return string The configration in JSON format |
||
126 | */ |
||
127 | public function getConfigurationAsJson($pretty = false) |
||
177 | } |
||
178 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.