+++ /dev/null
-<?php
- class ClientsController extends AppController {
- public $helpers = array('Html', 'Form');
- public $components = array('RequestHandler');
-
- public function index() {
- $clients = $this->Client->find('all');
- $this->set(array(
- 'clients' => $clients,
- '_serialize' => array('clients')
- ));
- }
-
- public function view($id = null) {
- if (!$id) {
- throw new NotFoundException(__('Mauvais client'));
- }
-
- $client = $this->Client->findById($id);
- if (!$client) {
- throw new NotFoundException(__('Mauvais client'));
- }
- $this->set('client', $client);
- }
- }
-?>