Разделы
vvShop | RSS © 2008 – 2017
Контакты
email: igor@veselov.sumy.ua
skype: utz0r2
» » » Страница 4

easydb - простая обертка для PDO


PDO
$db = new \PDO(
    'mysql:host=localhost;dbname=something',
    'username',
    'putastrongpasswordhere'
);

$statement = $db->prepare('SELECT * FROM comments WHERE blogpostid = ? ORDER BY created ASC');
$exec = $statement->execute([$_GET['blogpostid']]);
$rows = $exec->fetchAll(\PDO::FETCH_ASSOC);
foreach ($rows as $row) {
    $template_engine->render('comment', $row);
}

EasyDB
$db = \ParagonIE\EasyDB\Factory::create(
    'mysql:host=localhost;dbname=something',
    'username',
    'putastrongpasswordhere'
);

$rows = $db->run('SELECT * FROM comments WHERE blogpostid = ? ORDER BY created ASC', $_GET['blogpostid']);
foreach ($rows as $row) {
    $template_engine->render('comment', $row);
}

https://github.com/paragonie/easydb

jakzal/phpqa - инструменты статического анализа PHP в докер контейнере


composer - Dependency Manager for PHP
box - An application for building and managing Phars
php-cs-fixer - PHP Coding Standards Fixer
phpcf - Finds usage of deprecated features
phpca - Finds usage of non-built-in extensions
phpdoc-to-typehint - Automatically adds type hints and return types based on PHPDocs
php-formatter - Custom coding standards fixer
phpmetrics - Static Analysis Tool
phpstan - Static Analysis Tool
phan - Static Analysis Tool
dephpend - Detect flaws in your architecture
psalm - Finds errors in PHP applications
phpDocumentor - Documentation generator
phpcpd - Copy/Paste Detector
phploc - A tool for quickly measuring the size of a PHP project
phpmd - A tool for finding problems in PHP code
phpmnd - Helps to detect magic numbers
pdepend - Static Analysis Tool
phpcs - Detects coding standard violations
phpcbf - Automatically corrects coding standard violations
phpcb - PHP Code Browser
phpa - Checks for weak assumptions
deprecation-detector - Finds usages of deprecated code
deptrac - Enforces dependency rules
phpda - Generates dependency graphs
php-coupling-detector - Detects code coupling issues
analyze - Visualizes metrics and source code
design-pattern - Dettects design patterns
parallel-lint - Checks PHP file syntax
php-semver-checker - Suggests a next version according to semantic versioning
https://github.com/jakzal/phpqa

Orchid - пакет для Laravel позволяет ускорить разработку и администрирование сайта


Orchid - пакет для Laravel позволяет ускорить разработку и администрирование сайта

https://theorchid.github.io/

moment.php - аналог moment.js на php



$m = new \Moment\Moment(); // default is "now" UTC
echo $m->format(); // e.g. 2012-10-03T10:00:00+0000

$m = new \Moment\Moment('now', 'Europe/Berlin');
echo $m->format(); // e.g. 2012-10-03T12:00:00+0200

$m = new \Moment\Moment('2017-06-06T10:00:00', 'Europe/Berlin');
echo $m->format(); // e.g. 2012-10-03T12:00:00+0200

$m = new \Moment\Moment(1499366585);
echo $m->format(); // e.g. 2017-07-06T18:43:05+0000

https://github.com/fightbulc/moment.php

RedBeanPHP - php ORM для работы с базами данных


Поддерживает через pdo драйвер такие бд: MySQL, MariaDB, SQLite, PostgreSQL and CUBRID
    require 'rb.php';
    R::setup();
    R::setAutoResolve( TRUE );        //Recommended as of version 4.2
    $post = R::dispense( 'post' );
    $post->text = 'Hello World';

    $id = R::store( $post );          //Create or Update
    $post = R::load( 'post', $id );   //Retrieve
    R::trash( $post );                //Delete

http://redbeanphp.com/

CImage - php скрипт для манипуляций над изображениями


CImage - php скрипт для манипуляций над изображениями

img.php?src=kodim04.png&width=80&height=80&crop-to-fit

https://cimage.se/
«»
Вверх