/
sass.php
84 lines (72 loc) · 2.54 KB
/
sass.php
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
namespace {
/**
* SASS compiler via libsass
* @author Ivan Shalganov <a.cobest@gmail.com>
* @link https://github.com/hcatlin/libsass libsass
* @link http://sass-lang.com/ SASS language
* */
class SASS {
/**
* Version of the extension
* */
const VERSION_NUMBER = 2; // mean 0.2
/**
* 'Nested' format
* */
const STYLE_NESTED = 0;
/**
* Not implemented in libsass
* @link https://github.com/hcatlin/libsass/issues/15
* */
const STYLE_EXPANDED = 1;
/**
* Not implemented in libsass
* @link https://github.com/hcatlin/libsass/issues/15
* */
const STYLE_COMPACT = 2;
/**
* Not implemented in libsass
* @link https://github.com/hcatlin/libsass/issues/15
* */
const STYLE_COMPRESSED = 3;
/**
* Compile string
* @static
* @param string $string input SASS string
* @param int $options one of the constants SASS::STYLE_*
* @param string $include_paths *not implemented*
* @return string output CSS
* @throws SASS\CompileErrorException if compilation failed
*/
public static function compile($string, $options = self::STYLE_NESTED, $include_paths = null) {}
/**
* Compile file
* @static
* @param string $filename input filename
* @param int $options one of the constants SASS::STYLE_*
* @param string $include_paths *not implemented*
* @return string compiled content of the file
* @throws SASS\CompileErrorException if compilation failed or invalid arguments given
*/
public static function compileFile($filename, $options = self::STYLE_NESTED, $include_paths = null) {}
/**
* Not implemented
* Compile directory recursively
* @static
* @param string $input input directory
* @param string $output output directory
* @param int $options one of the constants SASS::STYLE_*
* @param string $include_paths *not implemented*
* @throws SASS\CompileErrorException if compilation failed or invalid arguments given
*/
public static function compileFolder($input, $output, $options = self::STYLE_NESTED, $include_paths = null) {}
}
}
namespace SASS {
/**
* Runtime compilation error
* */
class CompileErrorException extends \Exception {}
}
?>