PHP Class Asvae\ApiTester\Storages\JsonStorage

Inheritance: implements Asvae\ApiTester\Contracts\StorageInterface
Afficher le fichier Open project: asvae/laravel-api-tester

Protected Properties

Свойство Type Description
$collection Asvae\ApiTester\Collections\RequestCollection
$filename
$files
$path

Méthodes publiques

Méthode Description
__construct ( Illuminate\Filesystem\Filesystem $files, RequestCollection $collection, $path ) Storage constructor.
get ( ) : RequestCollection Return array parsed from file content.
getFilePath ( ) : string Return full file path.
getFilename ( ) : string
getPath ( ) : string Return path to folder that can contain file.
put ( RequestCollection $data ) : void

Méthodes protégées

Méthode Description
createDirectoryIfNotExists ( ) Make directory path if not exists
parseResult ( $content ) : array Parse result form given string

Private Methods

Méthode Description
convertToJson ( $data ) : null | string
makeCollection ( array $data = [] ) : RequestCollection
prepareContent ( Traversable | array $data ) : string Prepare content string from given data

Method Details

__construct() public méthode

Storage constructor.
public __construct ( Illuminate\Filesystem\Filesystem $files, RequestCollection $collection, $path )
$files Illuminate\Filesystem\Filesystem
$collection Asvae\ApiTester\Collections\RequestCollection
$path

createDirectoryIfNotExists() protected méthode

Make directory path if not exists

get() public méthode

Return array parsed from file content.
public get ( ) : RequestCollection
Résultat Asvae\ApiTester\Collections\RequestCollection

getFilePath() public méthode

Return full file path.
public getFilePath ( ) : string
Résultat string

getFilename() public méthode

public getFilename ( ) : string
Résultat string

getPath() public méthode

Return path to folder that can contain file.
public getPath ( ) : string
Résultat string

parseResult() protected méthode

Parse result form given string
protected parseResult ( $content ) : array
$content
Résultat array

put() public méthode

public put ( RequestCollection $data ) : void
$data Asvae\ApiTester\Collections\RequestCollection
Résultat void

Property Details

$collection protected_oe property

protected RequestCollection,Asvae\ApiTester\Collections $collection
Résultat Asvae\ApiTester\Collections\RequestCollection

$filename protected_oe property

protected $filename

$files protected_oe property

protected $files

$path protected_oe property

protected $path