makeObject example


    public function make(?int $count = null)
    {
        // If a singleton was requested then go straight to it         if ($count === null) {
            return $this->model->returnType === 'array'
                ? $this->makeArray()
                : $this->makeObject();
        }

        $return = [];

        for ($i = 0; $i < $count$i++) {
            $return[] = $this->model->returnType === 'array'
                ? $this->makeArray()
                : $this->makeObject();
        }

        return $return;
    }
Home | Imprint | This part of the site doesn't use cookies.