111
This commit is contained in:
+10
-8
@@ -26,15 +26,17 @@ use Exception;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mixed $class
|
* @param static $params
|
||||||
* @param mixed|null $method
|
* @param mixed $class
|
||||||
* @return bool
|
* @param mixed|null $method
|
||||||
* @throws Exception
|
* @return bool
|
||||||
*/
|
* @throws \Kiri\Exception\NotFindClassException
|
||||||
public function execute(mixed $class, mixed $method = null): bool
|
* @throws \ReflectionException
|
||||||
|
*/
|
||||||
|
public static function execute(mixed $params, mixed $class, mixed $method = null): bool
|
||||||
{
|
{
|
||||||
di(Getter::class)->addGetter($this->name, $class, $method);
|
di(Getter::class)->addGetter($params->name, $class, $method);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+18
-17
@@ -20,25 +20,26 @@ use Kiri\Kiri;
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Relation constructor.
|
* Relation constructor.
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
public function __construct(public string $name)
|
public function __construct(string $name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mixed $class
|
* @param static $params
|
||||||
* @param mixed|null $method
|
* @param mixed $class
|
||||||
* @return bool
|
* @param mixed|null $method
|
||||||
* @throws Exception
|
* @return bool
|
||||||
*/
|
* @throws Exception
|
||||||
public function execute(mixed $class, mixed $method = null): bool
|
*/
|
||||||
{
|
public static function execute(mixed $params, mixed $class, mixed $method = null): bool
|
||||||
di(Relate::class)->addRelate($class, $this->name, $method);
|
{
|
||||||
|
di(Relate::class)->addRelate($class, $params->name, $method);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,20 +16,22 @@ use Exception;
|
|||||||
* Set constructor.
|
* Set constructor.
|
||||||
* @param string $name
|
* @param string $name
|
||||||
*/
|
*/
|
||||||
public function __construct(public string $name)
|
public function __construct(string $name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param static $params
|
||||||
* @param mixed $class
|
* @param mixed $class
|
||||||
* @param mixed|null $method
|
* @param mixed|null $method
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws \Kiri\Exception\NotFindClassException
|
||||||
|
* @throws \ReflectionException
|
||||||
*/
|
*/
|
||||||
public function execute(mixed $class, mixed $method = null): bool
|
public static function execute(mixed $params, mixed $class, mixed $method = null): bool
|
||||||
{
|
{
|
||||||
di(Setter::class)->addSetter($this->name, $class, $method);
|
di(Setter::class)->addSetter($params->name, $class, $method);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user