This class represents the Lua table type inside the Luar interpreter.
Raudius\Luar\Interpreter\LuarObject\LuarObject, JsonSerializable, Stringable
Raudius\Luar\Interpreter\Scope
Name | Description |
---|---|
__toString | |
fromArray | Table instantiation from a PHP array. |
getLength | Returns the length of the table. This is the length as defined by Lua: https://www.lua.org/manual/5.3/manual.html#3.4.7 |
getMetaTable | Returns the meta table for this table. If none, returns a nil literal LuaObject See: https://www.lua.org/manual/5.3/manual.html#pdf-getmetatable |
getType | |
getValue | |
jsonSerialize | Converts the table to a JSON-serializable array. |
next | Returns the value that comes after the specified key. If key is NULL, the first value is returned. |
setMetaTable | Sets the meta-table for this object. |
Name | Description |
---|---|
__construct | - |
__debugInfo | - |
assign | - |
get | - |
getAssigns | - |
getExit | - |
getParent | - |
getReturn | - |
getScope | - |
has | - |
isRoot | - |
remove | - |
resetExit | - |
setExit | - |
setExpectedExit | - |
Description
__toString (void)
Parameters
This function has no parameters.
Return Values
void
Description
public static fromArray (array $array)
Table instantiation from a PHP array.
Parameters
(array) $array
Return Values
static
Description
public getLength (void)
Returns the length of the table. This is the length as defined by Lua: https://www.lua.org/manual/5.3/manual.html#3.4.7
Parameters
This function has no parameters.
Return Values
int
Description
public getMetaTable (void)
Returns the meta table for this table. If none, returns a nil
literal LuaObject
See: https://www.lua.org/manual/5.3/manual.html#pdf-getmetatable
Parameters
This function has no parameters.
Return Values
\LuarObject
Description
getType (void)
Parameters
This function has no parameters.
Return Values
void
Description
getValue (void)
Parameters
This function has no parameters.
Return Values
void
Description
public jsonSerialize (void)
Converts the table to a JSON-serializable array.
Parameters
This function has no parameters.
Return Values
array
Description
public next (void)
Returns the value that comes after the specified key. If key is NULL, the first value is returned.
Parameters
This function has no parameters.
Return Values
\LuarObject[]
[key, value]
Description
public setMetaTable (\Table|null $table)
Sets the meta-table for this object.
See Lua documentation for more information on meta-tables.
https://www.lua.org/manual/5.3/manual.html#pdf-setmetatable
Parameters
(\Table|null) $table
Return Values
void