-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap.php
More file actions
60 lines (52 loc) · 1.27 KB
/
bootstrap.php
File metadata and controls
60 lines (52 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* OOP Sandbox Plugin
*
* @package KnowTheCode\OOPSandbox
* @author hellofromTonya
* @license GPL-2.0+
*
* @wordpress-plugin
* Plugin Name: OOP Sandbox Plugin
* Plugin URI: https://KnowTheCode.io
* Description: OOP Sandbox test plugin
* Version: 1.0.0
* Author: hellofromTonya
* Author URI: https://KnowTheCode.io
* Text Domain: journals
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
namespace KnowTheCode\OOPSandbox;
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Cheatin’ uh?' );
}
function autoload() {
include( __DIR__ . '/src/class-user.php' );
}
function launch() {
autoload();
$config = array(
'tonya' => array(
'user_id' => 1,
'first_name' => 'Tonya',
'last_name' => 'Mork',
'email' => 'hellofromtonya@knowthecode.io',
'twitter' => '@hellofromtonya',
'facebook' => '',
),
'sally' => array(
'user_id' => 2,
'first_name' => 'Sally',
'last_name' => 'Jones',
'email' => 'sally.jones@gmail.com',
'twitter' => '@sallyjones',
'facebook' => '',
),
);
echo '======== Tonya\'s object ==========';
$tonya = new User( $config['tonya'] );
echo '======== Sally\'s object ==========';
$sally = new User( $config['sally'] );
}
launch();