具体代码如下: ```php public function size($queue = null) { return $this->adapter->useQueue($queue)->getAttribute()->getQueueAttributes()->getActiveMessages(); } ```