Skip to content

Commit 4b22a99

Browse files
committed
Merge pull request #3 from jaapio/feature/projectfactory
introduce factory interace for projects
2 parents 933f863 + 73945ae commit 4b22a99

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

src/Project.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* phpDocumentor
4+
*
5+
* PHP Version 5.5
6+
*
7+
* @copyright 2010-2015 Mike van Riel / Naenius (http://www.naenius.com)
8+
* @license http://www.opensource.org/licenses/mit-license.php MIT
9+
* @link http://phpdoc.org
10+
*/
11+
12+
namespace phpDocumentor\Reflection;
13+
14+
/**
15+
* Interface for project. Since the definition of a project can be different per factory this interface will be small.
16+
*/
17+
interface Project
18+
{
19+
/**
20+
* Returns the name of the project.
21+
*
22+
* @return string
23+
*/
24+
public function getName();
25+
}

src/ProjectFactory.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* phpDocumentor
4+
*
5+
* PHP Version 5.5
6+
*
7+
* @copyright 2010-2015 Mike van Riel / Naenius (http://www.naenius.com)
8+
* @license http://www.opensource.org/licenses/mit-license.php MIT
9+
* @link http://phpdoc.org
10+
*/
11+
namespace phpDocumentor\Reflection;
12+
13+
/**
14+
* Interface for project factories. A project factory shall convert a set of files
15+
* into an object implementing the Project interface.
16+
*/
17+
interface ProjectFactory
18+
{
19+
/**
20+
* Creates a project from the set of files.
21+
*
22+
* @param string[] $files
23+
* @return Project
24+
*/
25+
public function create(array $files);
26+
}

0 commit comments

Comments
 (0)