get()

get($pk)

This find and fetch a registry from the database and is always used with a Primary Key to identify the searched object.
@param Mixed $pk
@return PhpBURN_Core

Params


$pk
Model’s PK

Explanation


So if we want the registry where our PK is 42 we do like this:

$user = new Users();

$user->get(42); 

It’s equivalent to:


$user = new Users();

$user->id_user = 42;

$user->get();

OR


$user = new Users();

$user->where('id_users','=',42)->find(null, true)->fetch();