/** * log * * @param string $level * @param string $message * @param array $context * * @throws LoggerException * * @return mixed */ public function log($level, $message, array $context = []) { if (!in_array($this->mode, ['development', 'production'])) { throw new LoggerException($this->mode . ' n\'est pas définir'); } if ($this->mode === 'development') { die(static::htmlFormat($level, $message, $context)); } if ($this->mode === 'production') { if (!empty($context)) { $message = '\'' . $message . '\'' . ' in ' . $context['file'] . ' at ' . $context['line']; if (isset($context['trace'])) { if (is_string($context['trace'])) { $message .= $context['trace']; } } } Storage::append($this->path, static::textFormat($level, $message . '\\n')); } return $this; }
/** * Alias sur le connection FTP. * * @param null|array $c configuration FTP * @return \Bow\Support\Resource\Ftp\FTP */ function ftp($c = null) { return Storage::ftp($c); }
public function testFTPIsFile() { $this->assertEquals(true, Storage::ftp()->isFile('data.txt')); }