Skip to content

Instantly share code, notes, and snippets.

View rochamarcelo's full-sized avatar

Marcelo Rocha rochamarcelo

View GitHub Profile
@rochamarcelo
rochamarcelo / docker-compose.yml
Created July 31, 2023 17:26
docker-compose php-7-with-mysql
version: "3.1"
services:
mysql:
image: mysql:5.7
container_name: oneprojectday-mysql
working_dir: /application
volumes:
- .:/application
environment:
- MYSQL_ROOT_PASSWORD=secret
@rochamarcelo
rochamarcelo / docker-compose.yml
Created July 19, 2020 13:04
CakePHP docker setup
version: "3.1"
services:
php-fpm:
image: webdevops/php-nginx:7.4
container_name: myapp-webserver
working_dir: /app
volumes:
- ./:/app
environment:
- WEB_DOCUMENT_ROOT=/app/webroot
<?php
class JobController extends AppController
{
public function add()
{
$statuses = $this->Job->getStatuses();
$this->set('statuses', $statuses);
}
}
<?php
namespace App\Bonus;
class FindBonusCollection implements Iterator
{
private $_finders = array();
public function add(IFindBonus $finder)
{
$this->_finders[] = $finder;
}