PHP-Library
Some useful php libraries for easing code :)
Working with DB (PDO)
Instantiating Object and setting table
$db = new DB();
$db->table('tablename');Or Do it Directly (DID)
// Fetching results
DB::table('tablename')->get(); // will fetch every result from tableFor Complex Querying
$query = DB::table('tablename')->query("SELECT col, FROM @table . . .");
// @table refer to current table reference, if set with table() method.Fetching results
/**
* obj | array stash($type = '{}' || '[]')
* obj | array record($type = '{}' || '[]')
*
* $type parameter can be '{}' fetching results as object or '[]' for arrays
* $type parameter by default set to '{}'
*/
$db = new DB();
$query = $db->table('tablename')->get();
// single result
$result = $query->stash();
// for heap of results
$result = $query->record();Fetching data for single columns
DB::table('tablename')->get('column')Fetching multiple columns of your choice
DB::table('tablename')->get([
'cols' => ['col1', 'col2', 'col3', 'col4']
])Making use of table reference for every query
$db = new DB();
$db->table('tablename') // set table
// tablename will be set automatically as table reference for every query you made
$query1 = $db->get(); // no need to set table again
$result = $query1->stash();
$query2 = $db->where('col1', 'value')->get('col1'); // same for here
$result = $query2->stash();Working with Assets
To link css and js file:
Assets::bootstrap([
'filename1' => [
'css' => [
"path/to/style.css" ...
],
'js' => [
"path/to/script.js" ...
]
],
'filename2' => [
'css' => [],
'js' => []
]
]);
To link same style or script file to multiple files:
Assets::bootstrap([
'filename1 | filename2' => [
'css' => [
"path/to/style.css" ...
],
'js' => [
"path/to/script.js" ...
]
]
]);
// You can add as much filenames as you want
If you're not using routing simple edit the bool isfile(string $file) method according to your need.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
