Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Support/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class Resource

public $client;

protected static $ResourcesShouldPreventAccessingMissingAttributes = false;

public function __construct(Entry $client = null, $attributes = [])
{
$this->client = $client;
Expand All @@ -21,6 +23,18 @@ public function __construct(Entry $client = null, $attributes = [])
$this->fill($attributes);
}


/**
* Determine if accessing missing attributes is disabled.
* Nested Requirement originating from the Laravel 10 HasAttributes Trait
*
* @return bool
*/
public static function preventsAccessingMissingAttributes()
{
return static::$ResourcesShouldPreventAccessingMissingAttributes;
}

/**
* Fill the model with an array of attributes.
*
Expand Down