vendor/opis/closure/src/ReflectionClosure.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/* ===========================================================================
* Copyright (c) 2018-2019 Zindex Software
*
* Licensed under the MIT License
* =========================================================================== */
namespace Opis\Closure;
use Closure;
use ReflectionFunction;
class ReflectionClosure extends ReflectionFunction
{
protected $code;
protected $tokens;
protected $hashedName;
protected $useVariables;
protected $isStaticClosure;
protected $isScopeRequired;
protected $isBindingRequired;
protected $isShortClosure;
protected static $files = array();
protected static $classes = array();
protected static $functions = array();
protected static $constants = array();
protected static $structures = array();
/**
* ReflectionClosure constructor.
* @param Closure $closure
* @param string|null $code
* @throws \ReflectionException
*/
public function __construct(Closure $closure, $code = null)
{
$this->code = $code;
parent::__construct($closure);
}
/**
* @return bool
*/
public function isStatic()
{
if ($this->isStaticClosure === null) {
$this->isStaticClosure = strtolower(substr($this->getCode(), 0, 6)) === 'static';
}
return $this->isStaticClosure;
}
public function isShortClosure()
{
if ($this->isShortClosure === null) {
$code = $this->getCode();
if ($this->isStatic()) {
$code = substr($code, 6);
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。