public function singleObject($entity_class)
    {
        $this->execute();
        self::$statement->setFetchMode(PDO::FETCH_CLASS, $entity_class);
        $results = self::$statement->fetch();

        if (empty($results)) {
            throw new NonExistentID('Could not find that record, pass a record ID that exists', 1);
        } else {
            return $results;
        }
    }
public function singleObject($entity_class)
    {
        $this->execute();
        self::$statement->setFetchMode(PDO::FETCH_CLASS, $entity_class);
        $results = self::$statement->fetch();

        if (empty($results)) {
            throw new NonExistentID('Could not find that record, pass a record ID that exists', 1);
        } else {
            return $results;
        }
    }
public function singleObject ( $ entity_class ) { $ this -> execute ( ) ; self :: $ statement -> setFetchMode ( PDO :: FETCH_CLASS , $ entity_class ) ; $ results = self :: $ statement -> fetch ( ) ; if ( empty ( $ results ) ) { throw new NonExistentID ( 'Could not find that record, pass a record ID that exists' , 1 ) ; } else { return $ results ; } }
Return single object.
Return single object .