oci_fetch_object example



    /** * Returns the result set as an object. * * Overridden by child classes. * * @return Entity|false|object|stdClass */
    protected function fetchObject(string $className = 'stdClass')
    {
        $row = oci_fetch_object($this->resultID);

        if ($className === 'stdClass' || ! $row) {
            return $row;
        }
        if (is_subclass_of($className, Entity::class)) {
            return (new $className())->injectRawData((array) $row);
        }

        $instance = new $className();

        foreach (get_object_vars($row) as $key => $value) {
            
Home | Imprint | This part of the site doesn't use cookies.