@param array $data

@return StreamInterface<Row>
162070
private static function buildRows(array $data): StreamInterface
    {
        $rows = new Stream(Row::class);
        $responses = $data['data'] ?? [];

        foreach ($responses as $response) {
            foreach ($response['row'] as $idx => $row) {
                $rows = $rows->add(new Row\Row(
                    $data['columns'][$idx],
                    $row
                ));
            }
        }

        return $rows;
    }
1337682
public function withFileData($data)
    {
        $stream = new Stream('php://temp', Stream::MODE_READ_WRITE_RESET);

        $stream->write($data);
        $stream->rewind();

        return $this->withFileStream($stream);
    }
554672
public function batch(array $data = [])
    {
        foreach ($data as $column => $value) {
            $this->set($column, $value);
        }
        
        return $this;
    }
1320744
final public static function deserialize(array $data)
    {
        return Reconstitution::reconstitute()->objectFrom(
            get_called_class(),
            RecursiveSerializer::deserialize($data, self::deserializationCallbacks())
        );
    }
1072217
public function stream_write($data)
	{
		$left = substr($this->buffers[$this->name], 0, $this->position);
		$right = substr($this->buffers[$this->name], $this->position + strlen($data));
		$this->buffers[$this->name] = $left . $data . $right;
		$this->position += strlen($data);

		return strlen($data);
	}
658523
public static function fromArray(array $data = [])
    {
        $obj = new static();

        foreach ($data as $v) {
            $obj->addNode(Node::factory($v));
        }

        return $obj;
    }
478995
public static function create(array $data = [])
    {
        if (isset($data[0]) && is_array($data[0])) {

            $collection = new Collection();

            foreach ($data as $row) {
                /** @var ORM $obj */
                $class = get_called_class();
                $obj = new $class();
                $obj->setState($row);
                $obj->save();

                $collection->add($obj);
            }

            return $collection;
        }

        /** @var ORM $obj */
        $class = get_called_class();
        $obj = new $class();
        $obj->setState($data);
        $obj->save();

        return $obj;
    }
1025124
public static function fromData(array $data)
    {
        $group = new static(array_map(function ($data) {
            return $data['class']::fromData($data['params']);
        }, $data['constraints']));

        return $group->logicalOperator($data['logicalOperator']);
    }
824257
public function insert(array $data)
    {
        $this->normalizeDataColumns($data);

        $this->setSearchIndexableData($data);

        return $this->app['db']->insert($this->getTable(), $data);
    }
850989
public function load(array $data)
    {
        switch($data['Event']) {
            case WxReceiveEvent::EVENT_TYPE_LOCATION:
                return $this->createLocationEvent($data);
                break;
            case WxReceiveEvent::EVENT_TYPE_VIEW:
                return $this->createViewEvent($data);
                break;
            case WxReceiveEvent::EVENT_TYPE_CLICK:
                return $this->createClickEvent($data);
                break;
            case WxReceiveEvent::EVENT_TYPE_SCAN:
                return $this->createScanEvent($data);
                break;
            case WxReceiveEvent::EVENT_TYPE_SUBSCRIBE:
            case WxReceiveEvent::EVENT_TYPE_UN_SUBSCRIBE:
                return $this->createSubscribeEvent($data);
                break;
            default:
                break;
        }

        throw new RuntimeException("unknown Event({$data['Event']})");
    }
572139
protected function create(array $data)
    {
        if (null === $this->resultFactory) {
            $this->resultFactory = new Factory();
        }

        return $this->resultFactory->create($data);
    }
451874
public function with($data)
    {
        if (\is_array($data)) {
            $data = new Fluent($data);
        }

        $this->data = $data;

        return $this;
    }
258094
static public function createFromArray(array $data)
    {
        if (4 != count($data)) {
            throw new InvalidArgumentException("Expected data as a 4 length array.");
        }

        $filter = new static($data[0], $data[1]);
        $filter->setOperator($data[2]);
        $filter->setValue(unserialize($data[3]));

        return $filter;
    }
837646
public function fromArray($data)
    {
        foreach ($data as $key => $value) {
            if (is_int($key) || $this->isFillable($key)) {
                $this->set($key, $value);
            }
        }
        return $this;
    }
1301006
public final function setFromArray(array $data)
    {
        $dtoClass = $this->_getDtoClass();
        $this->exchangeArray([]);
        foreach ($data as $array) {
            if (!is_array($array)) {
                continue;
            }
            $this->append(new $dtoClass($array));
        }
        return $this;
    }
462366
protected function notifyAll(array $data)
    {
        foreach ($this
            ->getSession()
            ->getAllClientForType($this->getPoolerType()) as $client) {
            $client->notify('*', $data);
        }

        return $this;
    }
30090
public function data(array $data)
        {
            foreach ($data as $key => $value) {
                $this->attributes['data-'.$key] = $value;
            }
            return $this;
        }