1 | <?php |
||
36 | class FileTarget extends Target |
||
37 | { |
||
38 | /** |
||
39 | * @var string file path or [path alias](guide:concept-aliases). File name may contain the placeholders, |
||
40 | * which will be replaced by computed values. The supported placeholders are: |
||
41 | * |
||
42 | * - '{ts}' - profiling completion timestamp. |
||
43 | * - '{date}' - profiling completion date in format 'ymd'. |
||
44 | * - '{time}' - profiling completion time in format 'His'. |
||
45 | * |
||
46 | * The directory containing the file will be automatically created if not existing. |
||
47 | * If target file is already exist it will be overridden. |
||
48 | */ |
||
49 | public $filename = '@runtime/profiling/{date}-{time}.txt'; |
||
50 | /** |
||
51 | * @var int the permission to be set for newly created files. |
||
52 | * This value will be used by PHP chmod() function. No umask will be applied. |
||
53 | * If not set, the permission will be determined by the current environment. |
||
54 | */ |
||
55 | public $fileMode; |
||
56 | /** |
||
57 | * @var int the permission to be set for newly created directories. |
||
58 | * This value will be used by PHP chmod() function. No umask will be applied. |
||
59 | * Defaults to 0775, meaning the directory is read-writable by owner and group, |
||
60 | * but read-only for other users. |
||
61 | */ |
||
62 | public $dirMode = 0775; |
||
63 | |||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 1 | public function export(array $messages) |
|
87 | |||
88 | /** |
||
89 | * Resolves value of [[filename]] processing path alias and placeholders. |
||
90 | * @return string actual target filename. |
||
91 | */ |
||
92 | 1 | protected function resolveFilename() |
|
108 | |||
109 | /** |
||
110 | * Formats a profiling message for display as a string. |
||
111 | * @param array $message the profiling message to be formatted. |
||
112 | * The message structure follows that in [[Profiler::$messages]]. |
||
113 | * @return string the formatted message. |
||
114 | */ |
||
115 | 1 | protected function formatMessage(array $message) |
|
119 | } |