PHP Classes

File: src/voku/db/ActiveRecord.php

Recommend this page to a friend!
  Classes of Lars Moelleken   Simple Active Record   src/voku/db/ActiveRecord.php  
File: src/voku/db/ActiveRecord.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Simple Active Record
Store and fetch data with Active Records pattern
Author: By
Last change: [+]: add new "whereEscape()" method

-> use db->escape()
[+]: fix bugs reported by phpstan
[+]: update vendor libs

-> do less magic
[+]: use "CollectionActiveRecord::createFromGeneratorFunction()"
[+]: add "fetchOneByQueryOrThrowException()"

-> + check if "fetchOneByQuery()" will only fetch one entry, otherwise we will throw a exception
[+]: ignore false-positives from phpstan + fix found small bug
[+]: yield all the things :)
[+]: use collections for the results
[~]: replace strings in Expressions with class constants
[+]: add a simple "addRelation()" method + use "hashids/hashids"
[+]: move from "Simple MySQLi" into this repository
Date: 18 hours ago
Size: 54,981 bytes

 

You need to be a registered user and login to get this file.

1,617,702 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on: