Overview

Namespaces

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

Classes

  • Helper
  • ObjectArray
  • TypeDefinition

Interfaces

  • ToArrayInterface

Traits

  • MethodAlias
  • PrivateGetter
  • PrivateStrictGetter
  • PropertyLikeMethod
  • ReadOnly
  • TypeAssert
  • TypedProperty
  • Overview
  • Namespace
  • Class

Trait TypeAssert

Argument type assertion methods

Direct Known Users

Teto\Object\TypedProperty
Namespace: Teto\Object
Copyright: 2016 Baguette HQ
License: http://www.apache.org/licenses/LICENSE-2.0
Author: USAMI Kenta tadsan@zonu.me
Located at Object/TypeAssert.php
Methods summary
protected static
# assertValue( string $expected_type, string $name, mixed $value, boolean $is_nullable )

Assert a value is expected typed

Assert a value is expected typed

Parameters

$expected_type
$name
Variable name (for error message)
$value
Received value
$is_nullable

Throws

LogicException
InvalidArgumentException
protected static
# assertInt( mixed $value, string $name = null )

Assert a value is integer

Assert a value is integer

Parameters

$value
Received value
$name
Variable name (for error message)

Throws

InvalidArgumentException
protected static
# assertString( mixed $value, string $name = null )

Assert a value is string

Assert a value is string

Parameters

$value
Received value
$name
Variable name (for error message)

Throws

InvalidArgumentException
protected static
# assertArrayOrObject( mixed $value, string $name = null )

Assert a value is array or array like object (that inplements ArrayAccess)

Assert a value is array or array like object (that inplements ArrayAccess)

Parameters

$value
Received value
$name
Variable name (for error message)

Throws

InvalidArgumentException

See

http://php.net/manual/class.arrayaccess.php
protected static
# assertInstanceOf( mixed $value, string $class, string $name = null )

Assert a value is instance of $class

Assert a value is instance of $class

Parameters

$value
Received value
$class
Class name
$name
Variable name (for error message)

Throws

InvalidArgumentException
ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by ApiGen