Nwidart\Modules\Json::get PHP Method

get() public method

Get the specified attribute from json file.
public get ( $key, null $default = null ) : mixed
$key
$default null
return mixed
    public function get($key, $default = null)
    {
        return $this->attributes->get($key, $default);
    }

Usage Example

Example #1
0
 /** @test */
 public function it_sets_a_key_value()
 {
     $this->json->set('key', 'value');
     $this->assertEquals('value', $this->json->get('key'));
 }