Exercício de Arquitetura
Desenhar a arquitetura de software de um sistema de gerenciamento de conteúdo para um website de notícias.
O sistema deve permitir que administradores gerencie as notícias publicadas no website de notícias, processando as imagens das notícias em formato de thumbnail e otimizando-as para exibição. As imagens serão armazenadas em um repositório de arquivos. Além disso, o sistema deve ter uma versão mobile para acesso ao conteúdo através de dispositivos móveis. Não há restrições de componentes ou tecnologias.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('array_value_recursive')) { | |
/** | |
* Retrieves values from a multidimensional array, either by key or all values. | |
*/ | |
function array_value_recursive(array $arr, ?string $key = null, bool $unique = true): array | |
{ | |
array_walk_recursive($arr, function ($v, $k) use ($key, &$val) { | |
if (is_null($key) || ($key && $k == $key)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name": "guzzlehttp/guzzle", "description": "Guzzle is a PHP HTTP client library", "keywords": [ "framework", "http", "rest", "web service", "curl", "client", "HTTP client", "PSR-7", "PSR-18" ], "license": "MIT", "authors": [ {"name": "Graham Campbell", "email": "hello@gjcampbell.co.uk", "homepage": "https://github.com/GrahamCampbell"}, {"name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling"}, {"name": "Jeremy Lindblom", "email": "jeremeamia@gmail.com", "homepage": "https://github.com/jeremeamia"}, {"name": "George Mponos", "email": "gmponos@gmail.com", "homepage": "https://github.com/gmponos"}, {"name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com", "homepage": "https://github.com/Nyholm"}, {"name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", "homepage": "https://github.com/sagikazarmark"}, {"name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion"} ], "require": {"php": "^7.2.5 || ^8.0", "ext-json" |
%%{init: { 'logLevel': 'debug', 'gitGraph': {'showCommitLabel': false}} }%%
gitGraph
commit tag: "release 0.0"
branch hotfix
branch develop
checkout develop
commit
branch feature/FIPO-236
commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="refresh" content="0; url=https://example.com.br"> | |
<script type="text/javascript"> | |
window.location.href = "https://example.com.br" | |
</script> | |
<title>Page Redirection</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const base_url = 'https://api.github.com'; | |
function httpGet(theUrl, return_headers) { | |
var xmlHttp = new XMLHttpRequest(); | |
xmlHttp.open("GET", theUrl, false); // false for synchronous request | |
xmlHttp.send(null); | |
if (return_headers) { | |
return xmlHttp | |
} | |
return xmlHttp.responseText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checks if the class has been defined and Checks if the class method exists | |
* @param $class_object | |
* @param $method_name | |
* @return bool | |
*/ | |
function class_method_exists($class_object, $method_name) | |
{ | |
return class_exists($class_object) && method_exists($class_object, $method_name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple multi-bytes ucfirst() | |
* @param $str | |
* @return string | |
*/ | |
function mb_ucfirst_fix($str) | |
{ | |
return mb_strtoupper(mb_substr($str, 0, 1)) . mb_substr(mb_strtolower($str), 1); | |
} |