Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Commit

Permalink
Add suport for cast callback
Browse files Browse the repository at this point in the history
  • Loading branch information
MWGuy committed May 11, 2019
1 parent 31fb366 commit c32639c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.php.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: java-reflection-ext
version: 1.1.0
version: 1.1.1
description: Java Reflection API

plugins:
Expand Down
8 changes: 8 additions & 0 deletions sdk/java/reflection/ReflectionObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ public function toMemory() {}
* @return ReflectionObject
*/
public static function fromMemory($data): ReflectionObject {}

/**
* Return ReflectionObject (php.runtime.invoke.Invoker)
*
* @param callable $data
* @return ReflectionObject
*/
public static function fromCallback(callable $data): ReflectionObject {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import php.runtime.Memory;
import php.runtime.annotation.Reflection;
import php.runtime.env.Environment;
import php.runtime.invoke.Invoker;
import php.runtime.lang.BaseWrapper;
import php.runtime.reflection.ClassEntity;

Expand Down Expand Up @@ -48,4 +49,9 @@ public Memory toMemory() {
public static ReflectionObject fromMemory(Environment environment, Memory memory) {
return new ReflectionObject(environment, Memory.unwrap(environment, memory));
}

@Reflection.Signature
public static ReflectionObject fromCallback(Environment environment, Invoker callback) {
return new ReflectionObject(environment, callback);
}
}

0 comments on commit c32639c

Please sign in to comment.