October\Rain\Element\ElementBase
Overview
ElementBase class for all elements
Extends
Implements
- Illuminate\Contracts\Support\Arrayable
- ArrayAccess
- Illuminate\Contracts\Support\Jsonable
- JsonSerializable
Public Properties
public array $config
config values for this instance
Show inherited public properties
Inherited Public Properties
- $implement - extensions for this class. (defined in October\Rain\Extension\Extendable)
Protected Properties
There are no protected properties in the class.
Show inherited protected properties
Inherited Protected Properties
- $extensionData - contains class reflection information, including behaviors. (defined in October\Rain\Extension\Extendable)
- $extendableStaticMethods - is a collection of static methods used by behaviors. (defined in October\Rain\Extension\Extendable)
Public Methods
public __call()
public __call(string $method, array $parameters): $this
__call handles dynamic calls to the element instance to set config.
public __construct()
public __construct($config = []): void
public __get()
public __get(string $key): mixed
__get dynamically retrieves the value of an attribute.
public __isset()
public __isset(string $key): bool
__isset dynamically checks if an attribute is set.
public __set()
public __set(string $key, mixed $value): void
__set dynamically sets the value of an attribute.
public __unset()
public __unset(string $key): void
__unset dynamically unsets an attribute.
public evalConfig()
public evalConfig($config): void
evalConfig override method
public get()
public get(string $key, $default = null): void
get an attribute from the element instance.
public getConfig()
public getConfig($key = null, $default = null): void
getConfig returns the entire config array
public jsonSerialize()
public jsonSerialize(): array
jsonSerialize converts the object into something JSON serializable.
public offsetExists()
public offsetExists(string $offset): bool
offsetExists determines if the given offset exists.
public offsetGet()
public offsetGet(string $offset): mixed
offsetGet gets the value for a given offset.
public offsetSet()
public offsetSet(string $offset, mixed $value): void
offsetSet sets the value at the given offset.
public offsetUnset()
public offsetUnset(string $offset): void
offsetUnset unsets the value at the given offset.
public toArray()
public toArray(): array
toArray converts the element instance to an array.
public toJson()
public toJson(int $options = 0): string
toJson converts the element instance to JSON.
public useConfig()
public useConfig($config): October\Rain\Element\ElementBase
useConfig is used internally
Inherited Public Methods
- __callStatic() - calls an undefined static method. (defined in October\Rain\Extension\Extendable)
- __sleep() - prepare the object for serialization. (defined in October\Rain\Extension\Extendable)
- __wakeup() - when a model is being unserialized, check if it needs to be booted. (defined in October\Rain\Extension\Extendable)
- addDynamicMethod() - programmatically adds a method to the extendable class. (defined in October\Rain\Extension\Extendable)
- addDynamicProperty() - programmatically adds a property to the extendable class. (defined in October\Rain\Extension\Extendable)
- asExtension() - is short hand for
getClassExtension()method, except takes the short. (defined in October\Rain\Extension\Extendable) - clearExtendedClasses() - (defined in October\Rain\Extension\Extendable)
- extend() - this class with a closure. (defined in October\Rain\Extension\Extendable)
- extendClassWith() - dynamically extends a class with a specified behavior. (defined in October\Rain\Extension\Extendable)
- extendableCall() - magic method for
__call(). (defined in October\Rain\Extension\Extendable) - extendableCallStatic() - magic method for
__callStatic(). (defined in October\Rain\Extension\Extendable) - extendableConstruct() - should be called as part of the constructor. (defined in October\Rain\Extension\Extendable)
- extendableDestruct() - should be called when serializing the object. (defined in October\Rain\Extension\Extendable)
- extendableExtendCallback() - is a helper method for
::extend()static method. (defined in October\Rain\Extension\Extendable) - extendableGet() - magic method for
__get(). (defined in October\Rain\Extension\Extendable) - extendableSet() - magic method for
__set(). (defined in October\Rain\Extension\Extendable) - getClassExtension() - returns a behavior object from an extendable class, example:. (defined in October\Rain\Extension\Extendable)
- getClassMethodAsReflector() - (defined in October\Rain\Extension\Extendable)
- getClassMethods() - gets a list of class methods, extension equivalent of get_class_methods(). (defined in October\Rain\Extension\Extendable)
- getDynamicProperties() - returns all dynamic properties and their values. (defined in October\Rain\Extension\Extendable)
- implementClassWith() - will implement an extension using non-interference and should. (defined in October\Rain\Extension\Extendable)
- isClassExtendedWith() - checks if extendable class is extended with a behavior object. (defined in October\Rain\Extension\Extendable)
- isClassInstanceOf() - checks if the class implements the supplied interface methods. (defined in October\Rain\Extension\Extendable)
- methodExists() - checks if a method exists, extension equivalent of method_exists(). (defined in October\Rain\Extension\Extendable)
- propertyExists() - checks if a property exists, extension equivalent of
property_exists(). (defined in October\Rain\Extension\Extendable)
Protected Methods
protected initDefaultValues()
protected initDefaultValues(): void
initDefaultValues override method
Show inherited protected methods
Inherited Protected Methods
- extendableIsAccessible() - checks if a property is accessible, property equivalent. (defined in October\Rain\Extension\Extendable)
- extensionExtractImplements() - will return classes to implement. (defined in October\Rain\Extension\Extendable)
- extensionExtractMethods() - extracts the available methods from a behavior and adds it. (defined in October\Rain\Extension\Extendable)
- getExtendableMethodFromDynamicMethods() - (defined in October\Rain\Extension\Extendable)
- getExtendableMethodFromExtensions() - (defined in October\Rain\Extension\Extendable)