PHP code example of abdyek / whoo
1. Go to this page and download the library: Download abdyek/whoo library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abdyek / whoo example snippets
use Abdyek\Whoo\Whoo;
// Whoo once needs to load Propel config
Whoo::loadPropelConfig();
// Sign Up
$signUp = new Whoo('SignUp', [
'email' => '[email protected]',
'password' => 'this_is_password',
'username' => 'abdyek',
]);
$signUp->success(function(array $response) {
echo $response['user']->getUsername() . ' registered whoo database';
})->exception('NotUniqueEmail', function($e) {
// Oops! the email already is registered
})->exception('NotUniqueUsername', function($e) {
// Oops! the username already is registered
});
$signUp->run();