struct PHP::Any

Defined in:

php_serializer/any.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

to_php_serialized(io : IO)
to_php_serialized
to_php_serialized

Constructor Detail

def self.new(raw : Type) #

[View source]
def self.new(any : Any) #

[View source]

Instance Method Detail

def ==(other : PHP::Any) #

[View source]
def ==(other) #
Description copied from struct Struct

Returns true if this struct is equal to other.

Both structs' instance vars are compared to each other. Thus, two structs are considered equal if each of their instance variables are equal. Subclasses should override this method to provide specific equality semantics.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p2 = Point.new 1, 2
p3 = Point.new 3, 4

p1 == p2 # => true
p1 == p3 # => false

[View source]
def [](key : Int | String) : PHP::Any #

[View source]
def []?(key : Int | String) : PHP::Any | Nil #

[View source]
def as_bool : Bool #

[View source]
def as_bool? : Bool | Nil #

[View source]
def as_f : Float64 #

[View source]
def as_f32 : Float32 #

[View source]
def as_f32? : Float32 | Nil #

[View source]
def as_f? : Float64 | Nil #

[View source]
def as_h : Hash(Int32 | String, PHP::Any) #

[View source]
def as_h? : Hash(Int32 | String, PHP::Any) | Nil #

[View source]
def as_i : Int32 #

[View source]
def as_i64 : Int64 #

[View source]
def as_i64? : Int64 | Nil #

[View source]
def as_i? : Int32 #

[View source]
def as_nil : Nil #

[View source]
def as_o : PHP::Object #

[View source]
def as_o? : PHP::Object | Nil #

[View source]
def as_s : String #

[View source]
def as_s? : String | Nil #

[View source]
def inspect(*args, **options) #

[View source]
def inspect(*args, **options, &) #

[View source]
def pretty_print(*args, **options) #

[View source]
def pretty_print(*args, **options, &) #

[View source]
def raw : Type #

[View source]
def size : Int32 #

[View source]
def to_json(*args, **options) #

[View source]
def to_json(*args, **options, &) #

[View source]
def to_s(*args, **options) #

[View source]
def to_s(*args, **options, &) #

[View source]