Design Patterns: Elements of Reusable Object-Oriented Software – Gamma, Helm, Johnson, and Vlissides
This file contains hidden or 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 | |
| namespace Controllers; | |
| use OAuth\Common\Service\AbstractService; | |
| use OAuth\Common\Storage\Session as OAuthSession; | |
| class AuthController extends ControllerBase { | |
| // everytime we enter the controller, then we check for login, if yes, then we dont have to access here (except logout) |
This file contains hidden or 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 | |
| $url = 'https://qa-orderapi.intelispend.com/Processes/IntelispendAPI/IntelispendOrderAPI/SubmitFileService.serviceagent?wsdl'; | |
| $opts = array( | |
| 'http' => array( | |
| 'verify_peer' => false, | |
| 'verify_peer_name' => false | |
| ) | |
| ); | |
| $context = stream_context_create($opts); | |
| $client = new \SoapClient($url, |
This file contains hidden or 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
| #EXTM3U | |
| #EXTINF:-1 tvg-id="" tvg-name="Animal Planet" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/0/07/Animal_Planet_logo.svg/2000px-Animal_Planet_logo.svg.png" group-title="Documentarios",Animal Planet | |
| http://149.56.16.58:25461/live/ThiagosRodrigues/1zjCpIAyS8/1864.ts | |
| #EXTINF:-1 tvg-id="" tvg-name="Aparecida" tvg-logo="http://www.tvmagazine.com.br/imagens/icones/600/tvaparecida.png" group-title="Canais Abertos",Aparecida | |
| http://149.56.16.58:25461/live/ThiagosRodrigues/1zjCpIAyS8/1862.ts | |
| #EXTINF:-1 tvg-id="" tvg-name="Arte 1" tvg-logo="http://skyassinar.com.br/images/canais/244_5420BDCBD5F4097B.png" group-title="Variedades",Arte 1 | |
| http://149.56.16.58:25461/live/ThiagosRodrigues/1zjCpIAyS8/1861.ts | |
| #EXTINF:-1 tvg-id="" tvg-name="AXN" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/d/d0/AXN_Logo_2015.png" group-title="Series",AXN | |
| http://149.56.16.58:25461/live/ThiagosRodrigues/1zjCpIAyS8/1860.ts | |
| #EXTINF:-1 tvg-id="" tvg-name="Band Alternativo" tvg-logo="https://upload.wikimedia.org/wi |
This file contains hidden or 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
| Expressões regulares podem ser usadas para validação de dados, no caso usei palavras declaradas para realizar determinada ação usando uma function de callback como retorno. | |
| <?php | |
| $input = 'and where in select from'; | |
| function verifica($valor) | |
| { | |
| $regex = array('/where/','/from/'); | |
| $regular = preg_replace_callback($regex, create_function('$matches', 'return mb_strtoupper($matches[0]);'), $valor); | |
| echo $regular; | |
| } |