-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
39 lines (23 loc) · 767 Bytes
/
index.php
File metadata and controls
39 lines (23 loc) · 767 Bytes
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
<?php
use Repository\ProjectRepository;
spl_autoload_register(function($className) {
$path = __DIR__ . DIRECTORY_SEPARATOR .
str_replace("\\", DIRECTORY_SEPARATOR, $className) . ".php";
require_once $path;
});
$projectRepository = new ProjectRepository([
"Make a project one",
"Make a project two",
"Another project"
]
);
$project = $projectRepository->findById(1);
$project->addTask("Create repository");
$project->addTask("Code");
$project->addTask("Code...");
$project->addTask("Commit");
$project->addTask("Push into repo, make pull request");
$project2 = new Project("Project 2");
$projectRepository->add($project2);
$projectCnt = count($projectRepository);
var_dump($projectCnt);