Overview

Namespaces

  • Baguette
    • Mastodon
      • Config
      • Entity
      • Grant
      • Service
  • GuzzleHttp
    • Cookie
    • Exception
    • Handler
    • Promise
  • Psr
    • Http
      • Message
  • Teto
    • Object

Classes

  • DotEnvStorage

Interfaces

  • Storage
  • Overview
  • Namespace
  • Class

Class DotEnvStorage

Mastodon config storage using PHP dotenv

NOTICE: This class is designed for simple development use. You should not use this for production environments or for batch processing.

Dotenv\Loader
Extended by Baguette\Mastodon\Config\DotEnvStorage implements Baguette\Mastodon\Config\Storage uses Teto\Object\ReadOnly
Namespace: Baguette\Mastodon\Config
Copyright: 2017 Baguette HQ
License: GPL-3.0
Author: USAMI Kenta tadsan@zonu.me
See: https://github.com/vlucas/phpdotenv
Located at Config/DotEnvStorage.php
Methods summary
public
# __construct( string $file_path, array $options = [] )

Parameters

$file_path
$options

Throws

Dotenv\Exception\InvalidPathException
public array
# getAppName( )

Returns

array
public
# setAppName( string $app_name )

Parameters

$app_name
public array
# getAuthorization( )

Returns

array
public
# setAuthorization( string $access_token, string|string[]|Baguette\Mastodon\Service\Scope $scope = null, integer $created_at = null )

Parameters

$access_token
$scope
$created_at
public
# setAuthorizationFromObject( Baguette\Mastodon\Service\Authorization $authorization )

Parameters

$authorization
public array
# getClientIdAndSecret( )

Returns

array
public
# setClientIdAndSecret( string $client_id, string $client_secret )

Parameters

$client_id
$client_secret
public array
# getUsernameAndPassword( )

Returns

array
public
# setUsernameAndPassword( string $username, string $password )

Parameters

$username
$password
public array
# getValues( )

Returns all stored key-value pairs

Returns all stored key-value pairs

Returns

array
public string[]
# getLines( resource $fp = null )

Parameters

$fp

Returns

string[]
public
# save( )

Implementation of

Baguette\Mastodon\Config\Storage::save()
public static
# quoteValue( string $value )

Parameters

$value
Methods used from Teto\Object\ReadOnly
__set()
ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by ApiGen