Overview

Namespaces

  • Ecailles
    • NullObject
  • PHP

Classes

  • NullObject
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class NullObject

Class NullObject

Ecailles\NullObject\NullObject implements ArrayAccess, Countable, Iterator, JsonSerializable
Namespace: Ecailles\NullObject
Package: Ecailles\NullObject
Located at NullObject.php
Methods summary
public
# __construct( )

The constructor.

The constructor.

public static Ecailles\NullObject\NullObject
# __callStatic( string $name, mixed[] $arguments )

Does nothing when invoking an inaccessible method in a static context.

Does nothing when invoking an inaccessible method in a static context.

Parameters

$name
The name of the method being called.
$arguments
The arguments of the method being called.

Returns

Ecailles\NullObject\NullObject
Always returns a new instance of static.
public Ecailles\NullObject\NullObject
# __invoke( )

Invokes this class as a function.

Invokes this class as a function.

Returns

Ecailles\NullObject\NullObject
Always returns $this.
public Ecailles\NullObject\NullObject
# __call( string $name, mixed[] $arguments )

Does nothing when invoking an inaccessible method in an object context.

Does nothing when invoking an inaccessible method in an object context.

Parameters

$name
The name of the method being called.
$arguments
The arguments of the method being called.

Returns

Ecailles\NullObject\NullObject
Always returns $this.
public Ecailles\NullObject\NullObject
# __get( string $name )

Returns the value when reading data from an inaccessible property.

Returns the value when reading data from an inaccessible property.

Parameters

$name
The property name.

Returns

Ecailles\NullObject\NullObject
Always returns $this.
public
# __set( string $name, mixed $value )

Does nothing when writing data to an inaccessible property.

Does nothing when writing data to an inaccessible property.

Parameters

$name
The property name to set the value to.
$value
The value to set.
public string
# __toString( )

Returns a string representation of this object.

Returns a string representation of this object.

Returns

string
Always returns the string representation of null.
public
# __clone( )

Does nothing with a clone operation.

Does nothing with a clone operation.

public array
# __sleep( )

Returns the names of variables of this object that should be serialized.

Returns the names of variables of this object that should be serialized.

Returns

array
Always returns an empty array.
public Ecailles\NullObject\NullObject
# __wakeup( )

Reconstructs resources that this object may have when unserializing.

Reconstructs resources that this object may have when unserializing.

Returns

Ecailles\NullObject\NullObject
Always returns $this.
public stdClass
# jsonSerialize( )

Returns data which should be serialized to JSON.

Returns data which should be serialized to JSON.

Returns

stdClass
Always returns \stdClass.

Implementation of

JsonSerializable::jsonSerialize()
public Ecailles\NullObject\NullObject
# current( )

Returns the current element.

Returns the current element.

Returns

Ecailles\NullObject\NullObject
Always returns $this.

Implementation of

Iterator::current()
public
# next( )

Moves forward to next element.

Moves forward to next element.

Implementation of

Iterator::next()
public Ecailles\NullObject\NullObject
# key( )

Returns the key of the current element.

Returns the key of the current element.

Returns

Ecailles\NullObject\NullObject
Always returns $this.

Implementation of

Iterator::key()
public boolean
# valid( )

Checks if current position is valid.

Checks if current position is valid.

Returns

boolean
Always returns false.

Implementation of

Iterator::valid()
public
# rewind( )

Rewinds the Iterator to the first element.

Rewinds the Iterator to the first element.

Implementation of

Iterator::rewind()
public boolean
# offsetExists( mixed $offset )

Returns whether an offset exists.

Returns whether an offset exists.

Parameters

$offset
The offset to check for.

Returns

boolean
Always returns false.

Implementation of

ArrayAccess::offsetExists()
public Ecailles\NullObject\NullObject
# offsetGet( mixed $offset )

Retrieves the value of an offset.

Retrieves the value of an offset.

Parameters

$offset
The offset to retrieve.

Returns

Ecailles\NullObject\NullObject
Always returns $this.

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( mixed $offset, mixed $value )

Sets a value to an offset.

Sets a value to an offset.

Parameters

$offset
The offset to assign the value to.
$value
The value to set.

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( mixed $offset )

Unsets an offset.

Unsets an offset.

Parameters

$offset
The offset to unset.

Implementation of

ArrayAccess::offsetUnset()
public integer
# count( )

Returns the number of the elements of an object.

Returns the number of the elements of an object.

Returns

integer
Always returns 0.

Implementation of

Countable::count()
NullObject API Documentation API documentation generated by ApiGen