@@ 74-87 (lines=14) @@ | ||
71 | * @param string $content |
|
72 | * @param string $filename |
|
73 | */ |
|
74 | public function processContent($content, $filename = null) |
|
75 | { |
|
76 | $data = $this->parseContent($content); |
|
77 | $data += array('project' => basename($filename, '.info.yml'), 'version' => ''); |
|
78 | ||
79 | $project = new Project($data['project'], $data['core'], $data['version']); |
|
80 | $project->setDetails($data); |
|
81 | ||
82 | if (!empty($filename)) { |
|
83 | $project->setFilename(realpath($filename)); |
|
84 | } |
|
85 | ||
86 | $this->project = $project; |
|
87 | } |
|
88 | ||
89 | /** |
|
90 | * @param string $content |
@@ 79-95 (lines=17) @@ | ||
76 | * @param string $content |
|
77 | * @param string $filename |
|
78 | */ |
|
79 | public function processContent($content, $filename = null) |
|
80 | { |
|
81 | $data = $this->parseContent($content); |
|
82 | ||
83 | if (!empty($data['project'])) { |
|
84 | $data += array('version' => ''); |
|
85 | ||
86 | $project = new Project($data['project'], $data['core'], $data['version']); |
|
87 | $project->setDetails($data); |
|
88 | ||
89 | if (!empty($filename)) { |
|
90 | $project->setFilename(realpath($filename)); |
|
91 | } |
|
92 | ||
93 | $this->project = $project; |
|
94 | } |
|
95 | } |
|
96 | ||
97 | /** |
|
98 | * @param string $filename |