<?php
use Respect\Relational\Mapper;
use Respect\Data\Collections\Collection;
//Configuring
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 | |
use Respect\Rest\Router; | |
require_once 'vendor/autoload.php'; | |
// Routes | |
$router = new Router('/public'); | |
$router->any('/', 'Teste ok'); |
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
<VirtualHost *:80> | |
ServerName zf2napratica.dev | |
DocumentRoot /Users/j4ck3ds0n/Sites/zf2napratica/public | |
SetEnv APPLICATION_ENV "development" | |
SetEnv PROJECT_ROOT "/Users/j4ck3ds0n/Sites/zf2napratica" | |
<Directory /Users/j4ck3ds0n/Sites/zf2napratica/public> | |
DirectoryIndex index.php | |
Options FollowSymLinks | |
AllowOverride All | |
Order allow,deny |
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
sudo echo "//server/folder /volume/serverFiles cifs username=user,password=pass,user,dir_mode=0777,file_mode=0777 0 0\n" >> /etc/fstab |
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
#!/bin/bash | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
# install homebrew-dupes (required to install zlib, php54's dependency) | |
brew tap homebrew/dupes | |
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
brew install nginx mysql |
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
<snippet> | |
<content><![CDATA[public function get${1/(.*)/\u$1/}() | |
{ | |
return \$this->${1:$SELECTION}; | |
} | |
public function set${1/(.*)/\u$1/}(\$$1) | |
{ | |
\$this->$1 = \$$1; | |
return \$this; |
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 | |
//Sample: http://localhost/controller.php?name=Fulano | |
include 'model.php'; | |
$hw = new HelloWorld; | |
$name = $_GET['name']; | |
$greetings = $hw->say($name); |
- Eu não sou um desenvolvedor Zend Framework ou Symfony ou CakePHP
- Eu acho que o PHP é complicado o suficiente
- Eu gosto de construir coisas pequenas com efeitos simples
- Eu gosto de fazer coisas que resolvem problemas
- Eu gosto de construir coisas pequenas que trabalham em conjunto para resolver problemas maiores
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 | |
//Sample: http://localhost/controller.php?name=Fulano | |
include 'model.php'; | |
$hw = new HelloWorld; | |
$name = $_GET['name']; | |
$greetings = $hw->say($name); |
Input:
<?php
$markdown = [
'#' => 'Titulo teste',
'##' => 'Subtitulo teste',
'---',
[
'1.' => 'list 1',
'2.' => 'list 2',
OlderNewer