@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * @param Core\Services\AuthService\AuthService |
| 17 | 17 | * @return AuthService |
| 18 | - */ |
|
| 18 | + */ |
|
| 19 | 19 | protected static function getFacadeAccessor() |
| 20 | 20 | { |
| 21 | 21 | return 'AuthService'; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | class AbstractSession |
| 13 | 13 | { |
| 14 | 14 | |
| 15 | - public function getRecursiveSessionKey($data , $keyArr){ |
|
| 15 | + public function getRecursiveSessionKey($data , $keyArr){ |
|
| 16 | 16 | $arrayFound = isset($data[$keyArr[0]]) ? $data[$keyArr[0]] : ''; |
| 17 | 17 | if($arrayFound){ |
| 18 | 18 | unset($keyArr[0]); |
@@ -34,12 +34,12 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function exists($key,$val) |
| 36 | 36 | { |
| 37 | - $keySession = $this->get($key); |
|
| 37 | + $keySession = $this->get($key); |
|
| 38 | 38 | |
| 39 | - if($keySession){ |
|
| 40 | - return true; |
|
| 41 | - } |
|
| 42 | - return false; |
|
| 39 | + if($keySession){ |
|
| 40 | + return true; |
|
| 41 | + } |
|
| 42 | + return false; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | /** |
| 9 | 9 | * @param Core\Services\AuthService\AuthService |
| 10 | 10 | * @return AuthService |
| 11 | - */ |
|
| 11 | + */ |
|
| 12 | 12 | protected static function getFacadeAccessor() |
| 13 | 13 | { |
| 14 | 14 | return 'ImageService'; |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * @param Core\Services\AuthService\AuthService |
| 17 | 17 | * @return AuthService |
| 18 | - */ |
|
| 18 | + */ |
|
| 19 | 19 | protected static function getFacadeAccessor() |
| 20 | 20 | { |
| 21 | 21 | return 'FileService'; |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | |
| 7 | 7 | class FileService extends _Service |
| 8 | 8 | { |
| 9 | - public function moveUploadedFile($directory,$fileName, UploadedFile $uploadedFile) |
|
| 10 | - { |
|
| 11 | - $extension = pathinfo($uploadedFile->getClientFilename(), PATHINFO_EXTENSION); |
|
| 12 | - $basename = bin2hex(random_bytes(8)); // see http://php.net/manual/en/function.random-bytes.php |
|
| 13 | - $filename = sprintf('%s.%0.8s', $fileName, $extension); |
|
| 14 | - $uploadedFile->moveTo($directory . DIRECTORY_SEPARATOR . $filename); |
|
| 15 | - return $directory . DIRECTORY_SEPARATOR . $filename; |
|
| 16 | - } |
|
| 17 | - public function delete($file) |
|
| 18 | - { |
|
| 19 | - @unlink($file); |
|
| 20 | - } |
|
| 9 | + public function moveUploadedFile($directory,$fileName, UploadedFile $uploadedFile) |
|
| 10 | + { |
|
| 11 | + $extension = pathinfo($uploadedFile->getClientFilename(), PATHINFO_EXTENSION); |
|
| 12 | + $basename = bin2hex(random_bytes(8)); // see http://php.net/manual/en/function.random-bytes.php |
|
| 13 | + $filename = sprintf('%s.%0.8s', $fileName, $extension); |
|
| 14 | + $uploadedFile->moveTo($directory . DIRECTORY_SEPARATOR . $filename); |
|
| 15 | + return $directory . DIRECTORY_SEPARATOR . $filename; |
|
| 16 | + } |
|
| 17 | + public function delete($file) |
|
| 18 | + { |
|
| 19 | + @unlink($file); |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | 22 | } |
| 23 | 23 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | 'm' => [400,250,70], |
| 11 | 11 | 'l' => [800,600,80], |
| 12 | 12 | 'thumb' => [250, 250,80,true], |
| 13 | - ], |
|
| 13 | + ], |
|
| 14 | 14 | ], |
| 15 | 15 | 'minquality' => 200 // kamtar az in width va height nemigirim |
| 16 | 16 | ] |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | return [ |
| 3 | 3 | // Renderer settings |
| 4 | - 'view' => [ |
|
| 5 | - 'blade_template_path' => '../app/View/', // String or array of multiple paths |
|
| 6 | - 'blade_cache_path' => '../app/View/cache', // Mandatory by default, though could probably turn caching off for development |
|
| 7 | - 'template' => 'blade', // template name |
|
| 8 | - ], |
|
| 4 | + 'view' => [ |
|
| 5 | + 'blade_template_path' => '../app/View/', // String or array of multiple paths |
|
| 6 | + 'blade_cache_path' => '../app/View/cache', // Mandatory by default, though could probably turn caching off for development |
|
| 7 | + 'template' => 'blade', // template name |
|
| 8 | + ], |
|
| 9 | 9 | ]; |
| 10 | 10 | ?> |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * @var ContainerInterface $setting |
| 17 | 17 | * |
| 18 | - */ |
|
| 18 | + */ |
|
| 19 | 19 | public function init() |
| 20 | 20 | { |
| 21 | 21 | $setting = $this->settings['app']['translation']; |