# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
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 | |
/** | |
* Controller Demo for user Register events. | |
* | |
*/ | |
class Register extends CI_Controller{ | |
public function __construct(){ |
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 | |
namespace Events; | |
class RegisterUserSMSEvent { | |
public function handler($data){ | |
//script para enviar sms | |
if(sms()->send($data)) |
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 | |
namespace Events; | |
class RegisterUserMailerEvent { | |
public function handler($data){ | |
//script para enviar e-mail. | |
if( mailer()->send($data)) |
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 | |
/* | |
| ------------------------------------------------------------------- | |
| Auto-load Libraries | |
| ------------------------------------------------------------------- | |
| These are the classes located in the system/libraries folder | |
| or in your application/libraries folder. | |
| | |
| Prototype: | |
| |
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 | |
class Events { | |
/** | |
* @var array An array of listeners | |
*/ | |
protected static $_listeners = array(); | |
// ------------------------------------------------------------------------ | |
/** | |
* Register |
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
1 -Primeiro vamos dar uma olhada de como será nossa estrutura de pastas para isso. | |
2 -Vamos criar uma nova pasta dentro da nossa pasta aplicaction | |
--application | |
-Events | |
-core | |
-config | |
-controllers | |
-models |
Me encontrei em um problema com windows 10
###1 - Solução windows + r digite regedit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP Start mude para 4
Reinstalar c++ https://www.microsoft.com/en-us/download/details.aspx?id=30679
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
eval $("C:\Docker Toolbox\docker-machine" env dockerA --shell=gitbash ) |