Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 Copyright (c) 2009 hamcrest.org
5
 */
6
 
7
class StaticMethodFile extends FactoryFile
8
{
9
    /**
10
     * @var string containing method definitions
11
     */
12
    private $methods;
13
 
14
    public function __construct($file)
15
    {
16
        parent::__construct($file, '    ');
17
        $this->methods = '';
18
    }
19
 
20
    public function addCall(FactoryCall $call)
21
    {
22
        $this->methods .= PHP_EOL . $this->generateFactoryCall($call);
23
    }
24
 
25
    public function getDeclarationModifiers()
26
    {
27
        return 'public static ';
28
    }
29
 
30
    public function build()
31
    {
32
        $this->addFileHeader();
33
        $this->addPart('matchers_imports');
34
        $this->addPart('matchers_header');
35
        $this->addCode($this->methods);
36
        $this->addPart('matchers_footer');
37
    }
38
}