code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231
values | license stringclasses 13
values | size int64 1 2.01M |
|---|---|---|---|---|---|
<?php
App::uses('AppController', 'Controller');
/**
* Destinations Controller
*
* @property Destination $Destination
*/
class DestinationsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Destination->recursive = 0;
$this->set('destinations', $this->paginate());
}
/**
* view method
*
* @param string $id
* @return void
*/
public function view($id = null) {
$this->Destination->id = $id;
if (!$this->Destination->exists()) {
throw new NotFoundException(__('Invalid destination'));
}
$this->set('destination', $this->Destination->read(null, $id));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->Destination->create();
if ($this->Destination->save($this->request->data)) {
$this->Session->setFlash(__('The destination has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The destination could not be saved. Please, try again.'));
}
}
}
/**
* edit method
*
* @param string $id
* @return void
*/
public function edit($id = null) {
$this->Destination->id = $id;
if (!$this->Destination->exists()) {
throw new NotFoundException(__('Invalid destination'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->Destination->save($this->request->data)) {
$this->Session->setFlash(__('The destination has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The destination could not be saved. Please, try again.'));
}
} else {
$this->request->data = $this->Destination->read(null, $id);
}
}
/**
* delete method
*
* @param string $id
* @return void
*/
public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->Destination->id = $id;
if (!$this->Destination->exists()) {
throw new NotFoundException(__('Invalid destination'));
}
if ($this->Destination->delete()) {
$this->Session->setFlash(__('Destination deleted'));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Destination was not deleted'));
$this->redirect(array('action' => 'index'));
}
}
| 0001-bee | trunk/cakephp2/app/Controller/DestinationsController.php | PHP | gpl3 | 2,406 |
<?php
App::uses('AppController', 'Controller');
/**
* UsersLanguages Controller
*
* @property UsersLanguage $UsersLanguage
*/
class UsersLanguagesController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->UsersLanguage->recursive = 0;
$this->set('usersLanguages', $this->paginate());
}
/**
* view method
*
* @param string $id
* @return void
*/
public function view($id = null) {
$this->UsersLanguage->id = $id;
if (!$this->UsersLanguage->exists()) {
throw new NotFoundException(__('Invalid users language'));
}
$this->set('usersLanguage', $this->UsersLanguage->read(null, $id));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->UsersLanguage->create();
if ($this->UsersLanguage->save($this->request->data)) {
$this->Session->setFlash(__('The users language has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The users language could not be saved. Please, try again.'));
}
}
}
/**
* edit method
*
* @param string $id
* @return void
*/
public function edit($id = null) {
$this->UsersLanguage->id = $id;
if (!$this->UsersLanguage->exists()) {
throw new NotFoundException(__('Invalid users language'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->UsersLanguage->save($this->request->data)) {
$this->Session->setFlash(__('The users language has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The users language could not be saved. Please, try again.'));
}
} else {
$this->request->data = $this->UsersLanguage->read(null, $id);
}
}
/**
* delete method
*
* @param string $id
* @return void
*/
public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->UsersLanguage->id = $id;
if (!$this->UsersLanguage->exists()) {
throw new NotFoundException(__('Invalid users language'));
}
if ($this->UsersLanguage->delete()) {
$this->Session->setFlash(__('Users language deleted'));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Users language was not deleted'));
$this->redirect(array('action' => 'index'));
}
}
| 0001-bee | trunk/cakephp2/app/Controller/UsersLanguagesController.php | PHP | gpl3 | 2,471 |
<?php
App::uses('AppController', 'Controller');
/**
* Bids Controller
*
* @property Bid $Bid
*/
class BidsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Bid->recursive = 0;
$this->set('bids', $this->paginate());
}
/**
* view method
*
* @param string $id
* @return void
*/
public function view($id = null) {
$this->Bid->id = $id;
if (!$this->Bid->exists()) {
throw new NotFoundException(__('Invalid bid'));
}
$this->set('bid', $this->Bid->read(null, $id));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->Bid->create();
if ($this->Bid->save($this->request->data)) {
$this->Session->setFlash(__('The bid has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The bid could not be saved. Please, try again.'));
}
}
$jobs = $this->Bid->Job->find('list');
$users = $this->Bid->User->find('list');
$this->set(compact('jobs', 'users'));
}
/**
* edit method
*
* @param string $id
* @return void
*/
public function edit($id = null) {
$this->Bid->id = $id;
if (!$this->Bid->exists()) {
throw new NotFoundException(__('Invalid bid'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->Bid->save($this->request->data)) {
$this->Session->setFlash(__('The bid has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The bid could not be saved. Please, try again.'));
}
} else {
$this->request->data = $this->Bid->read(null, $id);
}
$jobs = $this->Bid->Job->find('list');
$users = $this->Bid->User->find('list');
$this->set(compact('jobs', 'users'));
}
/**
* delete method
*
* @param string $id
* @return void
*/
public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->Bid->id = $id;
if (!$this->Bid->exists()) {
throw new NotFoundException(__('Invalid bid'));
}
if ($this->Bid->delete()) {
$this->Session->setFlash(__('Bid deleted'));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Bid was not deleted'));
$this->redirect(array('action' => 'index'));
}
}
| 0001-bee | trunk/cakephp2/app/Controller/BidsController.php | PHP | gpl3 | 2,436 |
<?php
App::uses('AppController', 'Controller');
/**
* TranslatorsTranslators Controller
*
* @property TranslatorsTranslator $TranslatorsTranslator
*/
class TranslatorsTranslatorsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->TranslatorsTranslator->recursive = 0;
$this->set('translatorsTranslators', $this->paginate());
}
/**
* view method
*
* @param string $id
* @return void
*/
public function view($id = null) {
$this->TranslatorsTranslator->id = $id;
if (!$this->TranslatorsTranslator->exists()) {
throw new NotFoundException(__('Invalid translators translator'));
}
$this->set('translatorsTranslator', $this->TranslatorsTranslator->read(null, $id));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->TranslatorsTranslator->create();
if ($this->TranslatorsTranslator->save($this->request->data)) {
$this->Session->setFlash(__('The translators translator has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The translators translator could not be saved. Please, try again.'));
}
}
$translators = $this->TranslatorsTranslator->Translator->find('list');
$translators1s = $this->TranslatorsTranslator->Translators1->find('list');
$this->set(compact('translators', 'translators1s'));
}
/**
* edit method
*
* @param string $id
* @return void
*/
public function edit($id = null) {
$this->TranslatorsTranslator->id = $id;
if (!$this->TranslatorsTranslator->exists()) {
throw new NotFoundException(__('Invalid translators translator'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->TranslatorsTranslator->save($this->request->data)) {
$this->Session->setFlash(__('The translators translator has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The translators translator could not be saved. Please, try again.'));
}
} else {
$this->request->data = $this->TranslatorsTranslator->read(null, $id);
}
$translators = $this->TranslatorsTranslator->Translator->find('list');
$translators1s = $this->TranslatorsTranslator->Translators1->find('list');
$this->set(compact('translators', 'translators1s'));
}
/**
* delete method
*
* @param string $id
* @return void
*/
public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->TranslatorsTranslator->id = $id;
if (!$this->TranslatorsTranslator->exists()) {
throw new NotFoundException(__('Invalid translators translator'));
}
if ($this->TranslatorsTranslator->delete()) {
$this->Session->setFlash(__('Translators translator deleted'));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Translators translator was not deleted'));
$this->redirect(array('action' => 'index'));
}
}
| 0001-bee | trunk/cakephp2/app/Controller/TranslatorsTranslatorsController.php | PHP | gpl3 | 3,111 |
<?php
App::uses('AppController', 'Controller');
/**
* Translators Controller
*
* @property Translator $Translator
*/
class TranslatorsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Translator->recursive = 0;
$this->set('translators', $this->paginate());
}
/**
* view method
*
* @param string $id
* @return void
*/
public function view($id = null) {
$this->Translator->id = $id;
if (!$this->Translator->exists()) {
throw new NotFoundException(__('Invalid translator'));
}
$this->set('translator', $this->Translator->read(null, $id));
}
/**
* add method
*
* @return void
*/
public function add() {
if ($this->request->is('post')) {
$this->Translator->create();
if ($this->Translator->save($this->request->data)) {
$this->Session->setFlash(__('The translator has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The translator could not be saved. Please, try again.'));
}
}
}
/**
* edit method
*
* @param string $id
* @return void
*/
public function edit($id = null) {
$this->Translator->id = $id;
if (!$this->Translator->exists()) {
throw new NotFoundException(__('Invalid translator'));
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->Translator->save($this->request->data)) {
$this->Session->setFlash(__('The translator has been saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The translator could not be saved. Please, try again.'));
}
} else {
$this->request->data = $this->Translator->read(null, $id);
}
}
/**
* delete method
*
* @param string $id
* @return void
*/
public function delete($id = null) {
if (!$this->request->is('post')) {
throw new MethodNotAllowedException();
}
$this->Translator->id = $id;
if (!$this->Translator->exists()) {
throw new NotFoundException(__('Invalid translator'));
}
if ($this->Translator->delete()) {
$this->Session->setFlash(__('Translator deleted'));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Translator was not deleted'));
$this->redirect(array('action' => 'index'));
}
}
| 0001-bee | trunk/cakephp2/app/Controller/TranslatorsController.php | PHP | gpl3 | 2,378 |
<?php
/* Message Fixture generated on: 2011-10-21 10:09:26 : 1319184566 */
/**
* MessageFixture
*
*/
class MessageFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'text' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'stat' => array('type' => 'boolean', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_messages_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'text' => 'Lorem ipsum dolor sit amet',
'created' => '2011-10-21 10:09:26',
'modified' => '2011-10-21 10:09:26',
'stat' => 1,
'user_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/MessageFixture.php | PHP | gpl3 | 1,508 |
<?php
/* Part Fixture generated on: 2011-10-18 04:50:36 : 1318906236 */
/**
* PartFixture
*
*/
class PartFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'part_number' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 45, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 200, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'description' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'price' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'public' => array('type' => 'boolean', 'null' => true, 'default' => '1', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'id_UNIQUE' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'MyISAM')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'created' => '2011-10-18 04:50:36',
'modified' => '2011-10-18 04:50:36',
'part_number' => 'Lorem ipsum dolor sit amet',
'name' => 'Lorem ipsum dolor sit amet',
'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'price' => 1,
'public' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/PartFixture.php | PHP | gpl3 | 2,247 |
<?php
/* Job Fixture generated on: 2011-10-21 10:09:24 : 1319184564 */
/**
* JobFixture
*
*/
class JobFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'description' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_jobs_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'user_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/JobFixture.php | PHP | gpl3 | 1,579 |
<?php
/* Photo Fixture generated on: 2011-11-11 08:26:14 : 1320996374 */
/**
* PhotoFixture
*
*/
class PhotoFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'photo_group_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_photos_photo_groups' => array('column' => 'photo_group_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'photo_group_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/PhotoFixture.php | PHP | gpl3 | 1,092 |
<?php
/* Group Fixture generated on: 2011-11-11 07:33:21 : 1320993201 */
/**
* GroupFixture
*
*/
class GroupFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'created' => '2011-11-11 07:33:21',
'modified' => '2011-11-11 07:33:21'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/GroupFixture.php | PHP | gpl3 | 1,168 |
<?php
/* PhotoGroup Fixture generated on: 2011-11-11 08:26:14 : 1320996374 */
/**
* PhotoGroupFixture
*
*/
class PhotoGroupFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/PhotoGroupFixture.php | PHP | gpl3 | 1,379 |
<?php
/* TranslatorTranslator Fixture generated on: 2011-10-18 10:31:57 : 1318926717 */
/**
* TranslatorTranslatorFixture
*
*/
class TranslatorTranslatorFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'translator_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'translator_id1' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'approved' => array('type' => 'boolean', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => array('id', 'translator_id', 'translator_id1'), 'unique' => 1), 'fk_translators_translators_translators1' => array('column' => 'translator_id1', 'unique' => 0), 'fk_translators_translators_translators' => array('column' => 'translator_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'translator_id' => 1,
'translator_id1' => 1,
'approved' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/TranslatorTranslatorFixture.php | PHP | gpl3 | 1,405 |
<?php
/* Education Fixture generated on: 2011-10-21 10:09:24 : 1319184564 */
/**
* EducationFixture
*
*/
class EducationFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'start' => array('type' => 'date', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'end' => array('type' => 'date', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'edu_type_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_education_users1' => array('column' => 'user_id', 'unique' => 0), 'fk_education_edu_types1' => array('column' => 'edu_type_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'start' => '2011-10-21',
'end' => '2011-10-21',
'user_id' => 1,
'edu_type_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/EducationFixture.php | PHP | gpl3 | 1,586 |
<?php
/* Bid Fixture generated on: 2011-10-21 10:09:21 : 1319184561 */
/**
* BidFixture
*
*/
class BidFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'job_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_bids_jobs1' => array('column' => 'job_id', 'unique' => 0), 'fk_bids_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'job_id' => 1,
'user_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/BidFixture.php | PHP | gpl3 | 1,075 |
<?php
/* Destination Fixture generated on: 2011-10-21 10:09:23 : 1319184563 */
/**
* DestinationFixture
*
*/
class DestinationFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/DestinationFixture.php | PHP | gpl3 | 854 |
<?php
/* TranslatorFriend Fixture generated on: 2011-10-18 12:22:31 : 1318933351 */
/**
* TranslatorFriendFixture
*
*/
class TranslatorFriendFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'translator_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'friend_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'approved' => array('type' => 'boolean', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_translators_translators_translators1' => array('column' => 'friend_id', 'unique' => 0), 'fk_translators_translators_friends' => array('column' => 'translator_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'translator_id' => 1,
'friend_id' => 1,
'approved' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/TranslatorFriendFixture.php | PHP | gpl3 | 1,328 |
<?php
/* Translator Fixture generated on: 2011-10-18 12:12:46 : 1318932766 */
/**
* TranslatorFixture
*
*/
class TranslatorFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/TranslatorFixture.php | PHP | gpl3 | 859 |
<?php
/* UsersFriend Fixture generated on: 2011-10-21 10:09:30 : 1319184570 */
/**
* UsersFriendFixture
*
*/
class UsersFriendFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'friend_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'status' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_users_friends_friends1' => array('column' => 'friend_id', 'unique' => 0), 'fk_users_friends_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'user_id' => 1,
'friend_id' => 1,
'status' => 'Lorem ipsum dolor sit amet',
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'created' => '2011-10-21 10:09:30',
'modified' => '2011-10-21 10:09:30'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/UsersFriendFixture.php | PHP | gpl3 | 2,152 |
<?php
/* Profile Fixture generated on: 2011-10-21 10:09:28 : 1319184568 */
/**
* ProfileFixture
*
*/
class ProfileFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'first' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'last' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'day' => array('type' => 'date', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'gender' => array('type' => 'boolean', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'country' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'city/town' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'address' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_profiles_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'first' => 'Lorem ipsum dolor sit amet',
'last' => 'Lorem ipsum dolor sit amet',
'day' => '2011-10-21',
'gender' => 1,
'country' => 'Lorem ipsum dolor sit amet',
'city/town' => 'Lorem ipsum dolor sit amet',
'address' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'user_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/ProfileFixture.php | PHP | gpl3 | 2,440 |
<?php
/* Source Fixture generated on: 2011-10-21 10:09:28 : 1319184568 */
/**
* SourceFixture
*
*/
class SourceFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/SourceFixture.php | PHP | gpl3 | 839 |
<?php
/* UsersLanguage Fixture generated on: 2011-10-21 10:09:30 : 1319184570 */
/**
* UsersLanguageFixture
*
*/
class UsersLanguageFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'language_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_users_languages_languages1' => array('column' => 'language_id', 'unique' => 0), 'fk_users_languages_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'user_id' => 1,
'language_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/UsersLanguageFixture.php | PHP | gpl3 | 1,147 |
<?php
/* Language Fixture generated on: 2011-10-21 10:09:25 : 1319184565 */
/**
* LanguageFixture
*
*/
class LanguageFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'source_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'destination_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_languages_sources' => array('column' => 'source_id', 'unique' => 0), 'fk_languages_destinations' => array('column' => 'destination_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'source_id' => 1,
'destination_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/LanguageFixture.php | PHP | gpl3 | 1,138 |
<?php
/* MessagesUser Fixture generated on: 2011-10-21 10:09:26 : 1319184566 */
/**
* MessagesUserFixture
*
*/
class MessagesUserFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'message_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_messages_users_users1' => array('column' => 'user_id', 'unique' => 0), 'fk_messages_users_messages1' => array('column' => 'message_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'message_id' => 1,
'user_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/MessagesUserFixture.php | PHP | gpl3 | 1,138 |
<?php
/* EduType Fixture generated on: 2011-10-21 10:09:23 : 1319184563 */
/**
* EduTypeFixture
*
*/
class EduTypeFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/EduTypeFixture.php | PHP | gpl3 | 842 |
<?php
/* Post Fixture generated on: 2011-10-21 10:09:27 : 1319184567 */
/**
* PostFixture
*
*/
class PostFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_posts_users1' => array('column' => 'user_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'user_id' => 1,
'created' => '2011-10-21 10:09:27',
'modified' => '2011-10-21 10:09:27'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/PostFixture.php | PHP | gpl3 | 1,694 |
<?php
/* User Fixture generated on: 2011-10-21 10:09:29 : 1319184569 */
/**
* UserFixture
*
*/
class UserFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'password' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'mobile' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'email' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'code' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'status' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'name' => 'Lorem ipsum dolor sit amet',
'password' => 'Lorem ipsum dolor sit amet',
'mobile' => 'Lorem ipsum dolor sit amet',
'email' => 'Lorem ipsum dolor sit amet',
'code' => 'Lorem ipsum dolor sit amet',
'status' => 'Lorem ipsum dolor sit amet',
'created' => '2011-10-21 10:09:29',
'modified' => '2011-10-21 10:09:29'
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/UserFixture.php | PHP | gpl3 | 2,110 |
<?php
/* Comment Fixture generated on: 2011-10-21 10:09:22 : 1319184562 */
/**
* CommentFixture
*
*/
class CommentFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'post_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_comments_users1' => array('column' => 'user_id', 'unique' => 0), 'fk_comments_posts1' => array('column' => 'post_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'user_id' => 1,
'post_id' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/CommentFixture.php | PHP | gpl3 | 1,615 |
<?php
/* TranslatorsTranslator Fixture generated on: 2011-10-19 04:19:57 : 1318990797 */
/**
* TranslatorsTranslatorFixture
*
*/
class TranslatorsTranslatorFixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'translators_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'translators_id1' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''),
'approve' => array('type' => 'boolean', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''),
'indexes' => array('PRIMARY' => array('column' => array('id', 'translators_id1', 'translators_id'), 'unique' => 1), 'fk_translators_translators_translators2' => array('column' => 'translators_id1', 'unique' => 0), 'fk_translators_translators_translators1' => array('column' => 'translators_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = array(
array(
'id' => 1,
'translators_id' => 1,
'translators_id1' => 1,
'approve' => 1
),
);
}
| 0001-bee | trunk/cakephp2/app/Test/Fixture/TranslatorsTranslatorFixture.php | PHP | gpl3 | 1,415 |
<?php
/* Users Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('UsersController', 'Controller');
/**
* TestUsersController
*
*/
class TestUsersController extends UsersController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* UsersController Test Case
*
*/
class UsersControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Users = new TestUsersController();
$this->Users->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Users);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/UsersControllerTest.php | PHP | gpl3 | 1,722 |
<?php
/* PhotoGroups Test cases generated on: 2011-11-11 08:26:49 : 1320996409*/
App::uses('PhotoGroupsController', 'Controller');
/**
* TestPhotoGroupsController
*
*/
class TestPhotoGroupsController extends PhotoGroupsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* PhotoGroupsController Test Case
*
*/
class PhotoGroupsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.photo_group', 'app.photo');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->PhotoGroups = new TestPhotoGroupsController();
$this->PhotoGroups->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->PhotoGroups);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/PhotoGroupsControllerTest.php | PHP | gpl3 | 1,570 |
<?php
/* Groups Test cases generated on: 2011-11-11 07:33:35 : 1320993215*/
App::uses('GroupsController', 'Controller');
/**
* TestGroupsController
*
*/
class TestGroupsController extends GroupsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* GroupsController Test Case
*
*/
class GroupsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.group', 'app.user', 'app.photo', 'app.photo_group');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Groups = new TestGroupsController();
$this->Groups->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Groups);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/GroupsControllerTest.php | PHP | gpl3 | 1,540 |
<?php
/* Destinations Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('DestinationsController', 'Controller');
/**
* TestDestinationsController
*
*/
class TestDestinationsController extends DestinationsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* DestinationsController Test Case
*
*/
class DestinationsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.destination', 'app.language', 'app.source', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Destinations = new TestDestinationsController();
$this->Destinations->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Destinations);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/DestinationsControllerTest.php | PHP | gpl3 | 1,799 |
<?php
/* UsersLanguages Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('UsersLanguagesController', 'Controller');
/**
* TestUsersLanguagesController
*
*/
class TestUsersLanguagesController extends UsersLanguagesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* UsersLanguagesController Test Case
*
*/
class UsersLanguagesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.users_language', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->UsersLanguages = new TestUsersLanguagesController();
$this->UsersLanguages->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->UsersLanguages);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/UsersLanguagesControllerTest.php | PHP | gpl3 | 1,821 |
<?php
/* Languages Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('LanguagesController', 'Controller');
/**
* TestLanguagesController
*
*/
class TestLanguagesController extends LanguagesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* LanguagesController Test Case
*
*/
class LanguagesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.language', 'app.source', 'app.destination', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Languages = new TestLanguagesController();
$this->Languages->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Languages);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/LanguagesControllerTest.php | PHP | gpl3 | 1,766 |
<?php
/* Bids Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('BidsController', 'Controller');
/**
* TestBidsController
*
*/
class TestBidsController extends BidsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* BidsController Test Case
*
*/
class BidsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.bid', 'app.job', 'app.user', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Bids = new TestBidsController();
$this->Bids->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Bids);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/BidsControllerTest.php | PHP | gpl3 | 1,711 |
<?php
/* Photos Test cases generated on: 2011-11-11 08:48:19 : 1320997699*/
App::uses('PhotosController', 'Controller');
/**
* TestPhotosController
*
*/
class TestPhotosController extends PhotosController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* PhotosController Test Case
*
*/
class PhotosControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.photo', 'app.photo_group');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Photos = new TestPhotosController();
$this->Photos->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Photos);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/PhotosControllerTest.php | PHP | gpl3 | 1,515 |
<?php
/* MessagesUsers Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('MessagesUsersController', 'Controller');
/**
* TestMessagesUsersController
*
*/
class TestMessagesUsersController extends MessagesUsersController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* MessagesUsersController Test Case
*
*/
class MessagesUsersControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.messages_user', 'app.message', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->MessagesUsers = new TestMessagesUsersController();
$this->MessagesUsers->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->MessagesUsers);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/MessagesUsersControllerTest.php | PHP | gpl3 | 1,810 |
<?php
/* TranslatorFriends Test cases generated on: 2011-10-18 11:03:26 : 1318928606*/
App::uses('TranslatorFriendsController', 'Controller');
/**
* TestTranslatorFriendsController
*
*/
class TestTranslatorFriendsController extends TranslatorFriendsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* TranslatorFriendsController Test Case
*
*/
class TranslatorFriendsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translator_friend', 'app.translator', 'app.friend');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->TranslatorFriends = new TestTranslatorFriendsController();
$this->TranslatorFriends->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->TranslatorFriends);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/TranslatorFriendsControllerTest.php | PHP | gpl3 | 1,661 |
<?php
/* Sources Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('SourcesController', 'Controller');
/**
* TestSourcesController
*
*/
class TestSourcesController extends SourcesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* SourcesController Test Case
*
*/
class SourcesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.source', 'app.language', 'app.destination', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Sources = new TestSourcesController();
$this->Sources->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Sources);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/SourcesControllerTest.php | PHP | gpl3 | 1,744 |
<?php
/* Translators Test cases generated on: 2011-10-19 04:16:05 : 1318990565*/
App::uses('TranslatorsController', 'Controller');
/**
* TestTranslatorsController
*
*/
class TestTranslatorsController extends TranslatorsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* TranslatorsController Test Case
*
*/
class TranslatorsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translator', 'app.translator_friend', 'app.friend');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Translators = new TestTranslatorsController();
$this->Translators->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Translators);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/TranslatorsControllerTest.php | PHP | gpl3 | 1,595 |
<?php
/* Posts Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('PostsController', 'Controller');
/**
* TestPostsController
*
*/
class TestPostsController extends PostsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* PostsController Test Case
*
*/
class PostsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.post', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Posts = new TestPostsController();
$this->Posts->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Posts);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/PostsControllerTest.php | PHP | gpl3 | 1,722 |
<?php
/* Parts Test cases generated on: 2011-10-18 04:50:37 : 1318906237*/
App::uses('PartsController', 'Controller');
/**
* TestPartsController
*
*/
class TestPartsController extends PartsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* PartsController Test Case
*
*/
class PartsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.part');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Parts = new TestPartsController();
$this->Parts->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Parts);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/PartsControllerTest.php | PHP | gpl3 | 1,484 |
<?php
/* TranslatorsTranslators Test cases generated on: 2011-10-19 04:19:57 : 1318990797*/
App::uses('TranslatorsTranslatorsController', 'Controller');
/**
* TestTranslatorsTranslatorsController
*
*/
class TestTranslatorsTranslatorsController extends TranslatorsTranslatorsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* TranslatorsTranslatorsController Test Case
*
*/
class TranslatorsTranslatorsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translators_translator', 'app.translators', 'app.translators1');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->TranslatorsTranslators = new TestTranslatorsTranslatorsController();
$this->TranslatorsTranslators->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->TranslatorsTranslators);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/TranslatorsTranslatorsControllerTest.php | PHP | gpl3 | 1,728 |
<?php
/* TranslatorTranslators Test cases generated on: 2011-10-18 10:32:25 : 1318926745*/
App::uses('TranslatorTranslatorsController', 'Controller');
/**
* TestTranslatorTranslatorsController
*
*/
class TestTranslatorTranslatorsController extends TranslatorTranslatorsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* TranslatorTranslatorsController Test Case
*
*/
class TranslatorTranslatorsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translator_translator', 'app.translator', 'app.translator1');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->TranslatorTranslators = new TestTranslatorTranslatorsController();
$this->TranslatorTranslators->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->TranslatorTranslators);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/TranslatorTranslatorsControllerTest.php | PHP | gpl3 | 1,714 |
<?php
/* Educations Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('Educations', 'Controller');
/**
* TestEducations
*
*/
class TestEducations extends Educations {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* Educations Test Case
*
*/
class EducationsTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.edu_type', 'app.education', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Educations = new TestEducations();
$this->->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Educations);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/EducationsTest.php | PHP | gpl3 | 1,243 |
<?php
/* Messages Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('MessagesController', 'Controller');
/**
* TestMessagesController
*
*/
class TestMessagesController extends MessagesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* MessagesController Test Case
*
*/
class MessagesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.message', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Messages = new TestMessagesController();
$this->Messages->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Messages);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/MessagesControllerTest.php | PHP | gpl3 | 1,755 |
<?php
/* Jobs Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('JobsController', 'Controller');
/**
* TestJobsController
*
*/
class TestJobsController extends JobsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* JobsController Test Case
*
*/
class JobsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.job', 'app.user', 'app.bid', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Jobs = new TestJobsController();
$this->Jobs->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Jobs);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/JobsControllerTest.php | PHP | gpl3 | 1,711 |
<?php
/* Profiles Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('ProfilesController', 'Controller');
/**
* TestProfilesController
*
*/
class TestProfilesController extends ProfilesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* ProfilesController Test Case
*
*/
class ProfilesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.profile', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Profiles = new TestProfilesController();
$this->Profiles->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Profiles);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/ProfilesControllerTest.php | PHP | gpl3 | 1,755 |
<?php
/* EduTypes Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('EduTypesController', 'Controller');
/**
* TestEduTypesController
*
*/
class TestEduTypesController extends EduTypesController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* EduTypesController Test Case
*
*/
class EduTypesControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.edu_type', 'app.education', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->EduTypes = new TestEduTypesController();
$this->EduTypes->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->EduTypes);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/EduTypesControllerTest.php | PHP | gpl3 | 1,755 |
<?php
/* UsersFriends Test cases generated on: 2011-10-21 10:56:28 : 1319187388*/
App::uses('UsersFriendsController', 'Controller');
/**
* TestUsersFriendsController
*
*/
class TestUsersFriendsController extends UsersFriendsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* UsersFriendsController Test Case
*
*/
class UsersFriendsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.users_friend', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->UsersFriends = new TestUsersFriendsController();
$this->UsersFriends->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->UsersFriends);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/UsersFriendsControllerTest.php | PHP | gpl3 | 1,799 |
<?php
/* Comments Test cases generated on: 2011-10-21 10:56:27 : 1319187387*/
App::uses('CommentsController', 'Controller');
/**
* TestCommentsController
*
*/
class TestCommentsController extends CommentsController {
/**
* Auto render
*
* @var boolean
*/
public $autoRender = false;
/**
* Redirect action
*
* @param mixed $url
* @param mixed $status
* @param boolean $exit
* @return void
*/
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
/**
* CommentsController Test Case
*
*/
class CommentsControllerTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.comment', 'app.user', 'app.bid', 'app.job', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.post', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.destination', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Comments = new TestCommentsController();
$this->Comments->constructClasses();
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Comments);
parent::tearDown();
}
/**
* testIndex method
*
* @return void
*/
public function testIndex() {
}
/**
* testView method
*
* @return void
*/
public function testView() {
}
/**
* testAdd method
*
* @return void
*/
public function testAdd() {
}
/**
* testEdit method
*
* @return void
*/
public function testEdit() {
}
/**
* testDelete method
*
* @return void
*/
public function testDelete() {
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Controller/CommentsControllerTest.php | PHP | gpl3 | 1,755 |
<?php
/* Destination Test cases generated on: 2011-10-21 10:09:23 : 1319184563*/
App::uses('Destination', 'Model');
/**
* Destination Test Case
*
*/
class DestinationTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.destination', 'app.language', 'app.source', 'app.source1', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Destination = ClassRegistry::init('Destination');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Destination);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/DestinationTest.php | PHP | gpl3 | 858 |
<?php
/* PhotoGroup Test cases generated on: 2011-11-11 08:26:14 : 1320996374*/
App::uses('PhotoGroup', 'Model');
/**
* PhotoGroup Test Case
*
*/
class PhotoGroupTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.photo_group', 'app.photo');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->PhotoGroup = ClassRegistry::init('PhotoGroup');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->PhotoGroup);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/PhotoGroupTest.php | PHP | gpl3 | 618 |
<?php
/* Group Test cases generated on: 2011-11-11 07:33:21 : 1320993201*/
App::uses('Group', 'Model');
/**
* Group Test Case
*
*/
class GroupTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.group', 'app.user', 'app.photo', 'app.photo_group');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Group = ClassRegistry::init('Group');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Group);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/GroupTest.php | PHP | gpl3 | 608 |
<?php
/* Comment Test cases generated on: 2011-10-21 10:09:22 : 1319184562*/
App::uses('Comment', 'Model');
/**
* Comment Test Case
*
*/
class CommentTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.comment', 'app.user', 'app.bid', 'app.job', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.post', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Comment = ClassRegistry::init('Comment');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Comment);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/CommentTest.php | PHP | gpl3 | 811 |
<?php
/* Photo Test cases generated on: 2011-11-11 08:26:14 : 1320996374*/
App::uses('Photo', 'Model');
/**
* Photo Test Case
*
*/
class PhotoTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.photo', 'app.photo_group');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Photo = ClassRegistry::init('Photo');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Photo);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/PhotoTest.php | PHP | gpl3 | 583 |
<?php
/* Language Test cases generated on: 2011-10-21 10:09:25 : 1319184565*/
App::uses('Language', 'Model');
/**
* Language Test Case
*
*/
class LanguageTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.language', 'app.source', 'app.source1', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Language = ClassRegistry::init('Language');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Language);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/LanguageTest.php | PHP | gpl3 | 818 |
<?php
/* EduType Test cases generated on: 2011-10-21 10:09:23 : 1319184563*/
App::uses('EduType', 'Model');
/**
* EduType Test Case
*
*/
class EduTypeTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.edu_type', 'app.education', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->EduType = ClassRegistry::init('EduType');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->EduType);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/EduTypeTest.php | PHP | gpl3 | 811 |
<?php
/* Post Test cases generated on: 2011-10-21 10:09:27 : 1319184567*/
App::uses('Post', 'Model');
/**
* Post Test Case
*
*/
class PostTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.post', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Post = ClassRegistry::init('Post');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Post);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/PostTest.php | PHP | gpl3 | 790 |
<?php
/* User Test cases generated on: 2011-10-21 10:09:29 : 1319184569*/
App::uses('User', 'Model');
/**
* User Test Case
*
*/
class UserTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->User = ClassRegistry::init('User');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->User);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/UserTest.php | PHP | gpl3 | 790 |
<?php
/* UsersFriend Test cases generated on: 2011-10-21 10:09:30 : 1319184570*/
App::uses('UsersFriend', 'Model');
/**
* UsersFriend Test Case
*
*/
class UsersFriendTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.users_friend', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->UsersFriend = ClassRegistry::init('UsersFriend');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->UsersFriend);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/UsersFriendTest.php | PHP | gpl3 | 839 |
<?php
/* Source Test cases generated on: 2011-10-21 10:09:28 : 1319184568*/
App::uses('Source', 'Model');
/**
* Source Test Case
*
*/
class SourceTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.source', 'app.language', 'app.source1', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Source = ClassRegistry::init('Source');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Source);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/SourceTest.php | PHP | gpl3 | 804 |
<?php
/* Translator Test cases generated on: 2011-10-18 10:31:49 : 1318926709*/
App::uses('Translator', 'Model');
/**
* Translator Test Case
*
*/
class TranslatorTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translator', 'app.translator_translator');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Translator = ClassRegistry::init('Translator');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Translator);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/TranslatorTest.php | PHP | gpl3 | 633 |
<?php
/* Profile Test cases generated on: 2011-10-21 10:09:28 : 1319184568*/
App::uses('Profile', 'Model');
/**
* Profile Test Case
*
*/
class ProfileTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.profile', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Profile = ClassRegistry::init('Profile');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Profile);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/ProfileTest.php | PHP | gpl3 | 811 |
<?php
/* Bid Test cases generated on: 2011-10-21 10:09:21 : 1319184561*/
App::uses('Bid', 'Model');
/**
* Bid Test Case
*
*/
class BidTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.bid', 'app.job', 'app.user', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Bid = ClassRegistry::init('Bid');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Bid);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/BidTest.php | PHP | gpl3 | 783 |
<?php
/* Job Test cases generated on: 2011-10-21 10:09:24 : 1319184564*/
App::uses('Job', 'Model');
/**
* Job Test Case
*
*/
class JobTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.job', 'app.user', 'app.bid', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Job = ClassRegistry::init('Job');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Job);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/JobTest.php | PHP | gpl3 | 783 |
<?php
/* Part Test cases generated on: 2011-10-18 04:50:37 : 1318906237*/
App::uses('Part', 'Model');
/**
* Part Test Case
*
*/
class PartTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.part');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Part = ClassRegistry::init('Part');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Part);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/PartTest.php | PHP | gpl3 | 556 |
<?php
/* UsersLanguage Test cases generated on: 2011-10-21 10:09:30 : 1319184570*/
App::uses('UsersLanguage', 'Model');
/**
* UsersLanguage Test Case
*
*/
class UsersLanguageTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.users_language', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->UsersLanguage = ClassRegistry::init('UsersLanguage');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->UsersLanguage);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/UsersLanguageTest.php | PHP | gpl3 | 853 |
<?php
/* Education Test cases generated on: 2011-10-21 10:09:24 : 1319184564*/
App::uses('Education', 'Model');
/**
* Education Test Case
*
*/
class EducationTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.education', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.message', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language', 'app.edu_type');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Education = ClassRegistry::init('Education');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Education);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/EducationTest.php | PHP | gpl3 | 825 |
<?php
/* TranslatorsTranslator Test cases generated on: 2011-10-19 04:19:57 : 1318990797*/
App::uses('TranslatorsTranslator', 'Model');
/**
* TranslatorsTranslator Test Case
*
*/
class TranslatorsTranslatorTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.translators_translator', 'app.translators', 'app.translators1');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->TranslatorsTranslator = ClassRegistry::init('TranslatorsTranslator');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->TranslatorsTranslator);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/TranslatorsTranslatorTest.php | PHP | gpl3 | 732 |
<?php
/* Message Test cases generated on: 2011-10-21 10:09:26 : 1319184566*/
App::uses('Message', 'Model');
/**
* Message Test Case
*
*/
class MessageTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.message', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.messages_user', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Message = ClassRegistry::init('Message');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->Message);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/MessageTest.php | PHP | gpl3 | 811 |
<?php
/* MessagesUser Test cases generated on: 2011-10-21 10:09:26 : 1319184566*/
App::uses('MessagesUser', 'Model');
/**
* MessagesUser Test Case
*
*/
class MessagesUserTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.messages_user', 'app.message', 'app.user', 'app.bid', 'app.job', 'app.comment', 'app.post', 'app.education', 'app.edu_type', 'app.profile', 'app.friend', 'app.users_friend', 'app.language', 'app.source', 'app.source1', 'app.users_language');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->MessagesUser = ClassRegistry::init('MessagesUser');
}
/**
* tearDown method
*
* @return void
*/
public function tearDown() {
unset($this->MessagesUser);
parent::tearDown();
}
}
| 0001-bee | trunk/cakephp2/app/Test/Case/Model/MessagesUserTest.php | PHP | gpl3 | 846 |
<?php
/**
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
| 0001-bee | trunk/cakephp2/app/index.php | PHP | gpl3 | 642 |
#!/usr/bin/php -q
<?php
/**
* Command-line code generation utility to automate programmer chores.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Console
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
$ds = DIRECTORY_SEPARATOR;
$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
$found = false;
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
foreach ($paths as $path) {
if (file_exists($path . $ds . $dispatcher)) {
$found = $path;
}
}
if (!$found && function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
ini_set('include_path', $root . $ds. 'lib' . PATH_SEPARATOR . ini_get('include_path'));
}
if (!include($dispatcher)) {
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
}
unset($paths, $path, $found, $dispatcher, $root, $ds);
return ShellDispatcher::run($argv);
| 0001-bee | trunk/cakephp2/app/Console/cake.php | PHP | gpl3 | 1,299 |
#!/bin/bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
# PHP 5
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright 2005-2011, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
#
# @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package app.Console
# @since CakePHP(tm) v 2.0
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
while [ -h "$LIB" ]; do
DIR=$(dirname -- "$LIB")
SYM=$(readlink "$LIB")
LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done
LIB=$(dirname -- "$LIB")/
APP=`pwd`
exec php -q "$LIB"cake.php -working "$APP" "$@"
exit;
| 0001-bee | trunk/cakephp2/app/Console/.svn/text-base/cake.svn-base | Shell | gpl3 | 1,051 |
#!/usr/bin/php -q
<?php
/**
* Command-line code generation utility to automate programmer chores.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Console
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
$ds = DIRECTORY_SEPARATOR;
$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
$found = false;
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
foreach ($paths as $path) {
if (file_exists($path . $ds . $dispatcher)) {
$found = $path;
}
}
if (!$found && function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
ini_set('include_path', $root . $ds. 'lib' . PATH_SEPARATOR . ini_get('include_path'));
}
if (!include($dispatcher)) {
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
}
unset($paths, $path, $found, $dispatcher, $root, $ds);
return ShellDispatcher::run($argv);
| 0001-bee | trunk/cakephp2/app/Console/.svn/text-base/cake.php.svn-base | PHP | gpl3 | 1,299 |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Bake is a shell script for running CakePHP bake script
:: PHP 5
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright 2005-2011, Cake Software Foundation, Inc.
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
:: @link http://cakephp.org CakePHP(tm) Project
:: @package app.Console
:: @since CakePHP(tm) v 2.0
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
@echo.
@echo off
SET app=%0
SET lib=%~dp0
php -q "%lib%cake.php" -working "%CD% " %*
echo.
exit /B %ERRORLEVEL%
| 0001-bee | trunk/cakephp2/app/Console/cake.bat | Batchfile | gpl3 | 963 |
#!/bin/bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
# PHP 5
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright 2005-2011, Cake Software Foundation, Inc.
#
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
#
# @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package app.Console
# @since CakePHP(tm) v 2.0
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
while [ -h "$LIB" ]; do
DIR=$(dirname -- "$LIB")
SYM=$(readlink "$LIB")
LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
done
LIB=$(dirname -- "$LIB")/
APP=`pwd`
exec php -q "$LIB"cake.php -working "$APP" "$@"
exit;
| 0001-bee | trunk/cakephp2/app/Console/cake | Shell | gpl3 | 1,051 |
<?php
/**
* This is core configuration file.
*
* Use it to configure core behaviour of Cake.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* In this file you set up your database connection details.
*
* @package cake.config
*/
/**
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
*
* driver => The name of a supported driver; valid options are as follows:
* Database/Mysql - MySQL 4 & 5,
* Database/Sqlite - SQLite (PHP5 only),
* Database/Postgres - PostgreSQL 7 and higher,
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
*
* You can add custom database drivers (or override existing drivers) by adding the
* appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php',
*
*
* persistent => true / false
* Determines whether or not the database should use a persistent connection
*
* host =>
* the host you connect to the database. To add a socket or port number, use 'port' => #
*
* prefix =>
* Uses the given prefix for all the tables in this database. This setting can be overridden
* on a per-table basis with the Model::$tablePrefix property.
*
* schema =>
* For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
*
* encoding =>
* For MySQL, Postgres specifies the character encoding to use when connecting to the
* database. Uses database default not specified.
*
* unix_socket =>
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
*/
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'morethan',
'database' => 'bee',
'prefix' => '',
//'encoding' => 'utf8',
);
public $test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'morethan',
'database' => 'bee',
'prefix' => '',
//'encoding' => 'utf8',
);
}
| 0001-bee | trunk/cakephp2/app/Config/database.php | PHP | gpl3 | 2,630 |
<?php
/**
* Routes configuration
*
* In this file, you set up routes to your controllers and their actions.
* Routes are very important mechanism that allows you to freely connect
* different urls to chosen controllers and their actions (functions).
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/View/Pages/home.ctp)...
*/
Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
/**
* ...and connect the rest of 'Pages' controller's urls.
*/
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
/**
* Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.
*/
CakePlugin::routes();
/**
* Load the CakePHP default routes. Remove this if you do not want to use
* the built-in default routes.
*/
require CAKE . 'Config' . DS . 'routes.php';
| 0001-bee | trunk/cakephp2/app/Config/routes.php | PHP | gpl3 | 1,581 |
;<?php exit() ?>
;/**
; * ACL Configuration
; *
; *
; * PHP 5
; *
; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
; * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
; *
; * Licensed under The MIT License
; * Redistributions of files must retain the above copyright notice.
; *
; * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
; * @link http://cakephp.org CakePHP(tm) Project
; * @package app.Config
; * @since CakePHP(tm) v 0.10.0.1076
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
; */
; acl.ini.php - Cake ACL Configuration
; ---------------------------------------------------------------------
; Use this file to specify user permissions.
; aco = access control object (something in your application)
; aro = access request object (something requesting access)
;
; User records are added as follows:
;
; [uid]
; groups = group1, group2, group3
; allow = aco1, aco2, aco3
; deny = aco4, aco5, aco6
;
; Group records are added in a similar manner:
;
; [gid]
; allow = aco1, aco2, aco3
; deny = aco4, aco5, aco6
;
; The allow, deny, and groups sections are all optional.
; NOTE: groups names *cannot* ever be the same as usernames!
;
; ACL permissions are checked in the following order:
; 1. Check for user denies (and DENY if specified)
; 2. Check for user allows (and ALLOW if specified)
; 3. Gather user's groups
; 4. Check group denies (and DENY if specified)
; 5. Check group allows (and ALLOW if specified)
; 6. If no aro, aco, or group information is found, DENY
;
; ---------------------------------------------------------------------
;-------------------------------------
;Users
;-------------------------------------
[username-goes-here]
groups = group1, group2
deny = aco1, aco2
allow = aco3, aco4
;-------------------------------------
;Groups
;-------------------------------------
[groupname-goes-here]
deny = aco5, aco6
allow = aco7, aco8
| 0001-bee | trunk/cakephp2/app/Config/acl.ini.php | PHP | gpl3 | 2,028 |
<?php
/**
* This is core configuration file.
*
* Use it to configure core behavior of Cake.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 2);
/**
* Configure the Error handler used to handle errors for your application. By default
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
* and log errors with CakeLog when debug = 0.
*
* Options:
*
* - `handler` - callback - The callback to handle errors. You can set this to any callback type,
* including anonymous functions.
* - `level` - int - The level of errors you are interested in capturing.
* - `trace` - boolean - Include stack traces for errors in log files.
*
* @see ErrorHandler for more information on error handling and configuration.
*/
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
/**
* Configure the Exception handler used for uncaught exceptions. By default,
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
* framework errors will be coerced into generic HTTP errors.
*
* Options:
*
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
* including anonymous functions.
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
* should place the file for that class in app/Error. This class needs to implement a render method.
* - `log` - boolean - Should Exceptions be logged?
*
* @see ErrorHandler for more information on exception handling and configuration.
*/
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true
));
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
/**
* To configure CakePHP *not* to use mod_rewrite and to
* use CakePHP pretty URLs, remove these .htaccess
* files:
*
* /.htaccess
* /app/.htaccess
* /app/webroot/.htaccess
*
* And uncomment the App.baseUrl below:
*/
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP prefix routes.
*
* The value of the define determines the names of the routes
* and their associated controller actions:
*
* Set to an array of prefixes you want to use in your application. Use for
* admin or other prefixed routes.
*
* Routing.prefixes = array('admin', 'manager');
*
* Enables:
* `admin_index()` and `/admin/controller/index`
* `manager_index()` and `/manager/controller/index`
*
*/
//Configure::write('Routing.prefixes', array('admin'));
/**
* Turn off all caching application-wide.
*
*/
//Configure::write('Cache.disable', true);
/**
* Enable cache checking.
*
* If set to true, for view caching you must still use the controller
* public $cacheAction inside your controllers to define caching settings.
* You can either set it controller-wide by setting public $cacheAction = true,
* or in each action using $this->cacheAction = true.
*
*/
//Configure::write('Cache.check', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/
define('LOG_ERROR', 2);
/**
* Session configuration.
*
* Contains an array of settings to use for session configuration. The defaults key is
* used to define a default preset to use for sessions, any settings declared here will override
* the settings of the default config.
*
* ## Options
*
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
* - `Session.defaults` - The default configuration set to use as a basis for your session.
* There are four builtins: php, cake, cache, database.
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
* to the ini array.
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
* sessionids that change frequently. See CakeSession::$requestCountdown.
* - `Session.ini` - An associative array of additional ini values to set.
*
* The built in defaults are:
*
* - 'php' - Uses settings defined in your php.ini.
* - 'cake' - Saves session files in CakePHP's /tmp directory.
* - 'database' - Uses CakePHP's database sessions.
* - 'cache' - Use the Cache class to save sessions.
*
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
*
* To use database sessions, run the app/Config/Schema/sessions.php schema using
* the cake shell command: cake schema create Sessions
*
*/
Configure::write('Session', array(
'defaults' => 'php'
));
/**
* The level of CakePHP security.
*/
Configure::write('Security.level', 'medium');
/**
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'DYhG93b0qy89a8dfgd5f4asd8948gf88jh8j2G0FgaC9mi');
/**
* A random numeric string (digits only) used to encrypt/decrypt strings.
*/
Configure::write('Security.cipherSeed', '9187615079415656649683645');
/**
* Apply timestamps with the last modified time to static assets (js, css, images).
* Will append a querystring parameter containing the time the file was modified. This is
* useful for invalidating browser caches.
*
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
* and /vendors/csspp/csspp.php
*
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
*/
//Configure::write('Asset.filter.css', 'css.php');
/**
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
* output, and setting the config below to the name of the script.
*
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
*/
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
/**
* The classname and database used in CakePHP's
* access control lists.
*/
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
* If you are on PHP 5.3 uncomment this line and correct your server timezone
* to fix the date & time related errors.
*/
//date_default_timezone_set('UTC');
/**
*
* Cache Engine Configuration
* Default settings provided below
*
* File storage engine.
*
* Cache::config('default', array(
* 'engine' => 'File', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
* 'lock' => false, //[optional] use file locking
* 'serialize' => true, [optional]
* ));
*
* APC (http://pecl.php.net/package/APC)
*
* Cache::config('default', array(
* 'engine' => 'Apc', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* ));
*
* Xcache (http://xcache.lighttpd.net/)
*
* Cache::config('default', array(
* 'engine' => 'Xcache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'user' => 'user', //user from xcache.admin.user settings
* 'password' => 'password', //plaintext password (xcache.admin.pass)
* ));
*
* Memcache (http://www.danga.com/memcached/)
*
* Cache::config('default', array(
* 'engine' => 'Memcache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'servers' => array(
* '127.0.0.1:11211' // localhost, default port 11211
* ), //[optional]
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* ));
*
* Wincache (http://php.net/wincache)
*
* Cache::config('default', array(
* 'engine' => 'Wincache', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* ));
*/
/**
* Pick the caching engine to use. If APC is enabled use it.
* If running via cli - apc is disabled by default. ensure it's available and enabled in this case
*
*/
$engine = 'File';
if (extension_loaded('apc') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
$engine = 'Apc';
}
// In development mode, caches should expire quickly.
$duration = '+999 days';
if (Configure::read('debug') >= 1) {
$duration = '+10 seconds';
}
/**
* Configure the cache used for general framework caching. Path information,
* object listings, and translation cache files are stored with this configuration.
*/
Cache::config('_cake_core_', array(
'engine' => $engine,
'prefix' => 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
));
/**
* Configure the cache for model and datasource caches. This cache configuration
* is used to store schema descriptions, and table listings in connections.
*/
Cache::config('_cake_model_', array(
'engine' => $engine,
'prefix' => 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
));
| 0001-bee | trunk/cakephp2/app/Config/core.php | PHP | gpl3 | 11,759 |
<?php
/**
* This file is loaded automatically by the app/webroot/index.php file after core.php
*
* This file should load/create any application wide configuration settings, such as
* Caching, Logging, loading additional configuration files.
*
* You should also use this file to include any files that provide global functions/constants
* that your application uses.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.10.8.2117
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
// Setup a 'default' cache configuration for use in the application.
Cache::config('default', array('engine' => 'File'));
/**
* The settings below can be used to set additional paths to models, views and controllers.
*
* App::build(array(
* 'Plugin' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'),
* 'Model' => array('/full/path/to/models/', '/next/full/path/to/models/'),
* 'View' => array('/full/path/to/views/', '/next/full/path/to/views/'),
* 'Controller' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'),
* 'Model/Datasource' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'),
* 'Model/Behavior' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'),
* 'Controller/Component' => array('/full/path/to/components/', '/next/full/path/to/components/'),
* 'View/Helper' => array('/full/path/to/helpers/', '/next/full/path/to/helpers/'),
* 'Vendor' => array('/full/path/to/vendors/', '/next/full/path/to/vendors/'),
* 'Console/Command' => array('/full/path/to/shells/', '/next/full/path/to/shells/'),
* 'locales' => array('/full/path/to/locale/', '/next/full/path/to/locale/')
* ));
*
*/
/**
* Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
* string is passed to the inflection functions
*
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
*
*/
/**
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
* Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more
* advanced ways of loading plugins
*
* CakePlugin::loadAll(); // Loads all plugins at once
* CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
*
*/
| 0001-bee | trunk/cakephp2/app/Config/bootstrap.php | PHP | gpl3 | 3,000 |
<?php
/*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/
/**
* This is Acl Schema file
*
* Use it to configure database for ACL
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/*
*
* Using the Schema command line utility
* cake schema run create DbAcl
*
*/
class DbAclSchema extends CakeSchema {
public $name = 'DbAcl';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $acos = array(
'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'model' => array('type'=>'string', 'null' => true),
'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'alias' => array('type'=>'string', 'null' => true),
'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $aros = array(
'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'model' => array('type'=>'string', 'null' => true),
'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'alias' => array('type'=>'string', 'null' => true),
'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $aros_acos = array(
'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10),
'_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
'_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
'_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
'_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
);
}
| 0001-bee | trunk/cakephp2/app/Config/Schema/db_acl.php | PHP | gpl3 | 3,210 |
<?php
/*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/
/**
* This is i18n Schema file
*
* Use it to configure database for i18n
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/*
*
* Using the Schema command line utility
* cake schema run create i18n
*
*/
class i18nSchema extends CakeSchema {
public $name = 'i18n';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $i18n = array(
'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'),
'model' => array('type'=>'string', 'null' => false, 'key' => 'index'),
'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'field' => array('type'=>'string', 'null' => false, 'key' => 'index'),
'content' => array('type'=>'text', 'null' => true, 'default' => NULL),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
);
}
| 0001-bee | trunk/cakephp2/app/Config/Schema/i18n.php | PHP | gpl3 | 1,843 |
<?php
/*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/
/**
* This is Sessions Schema file
*
* Use it to configure database for Sessions
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config.Schema
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/*
*
* Using the Schema command line utility
* cake schema run create Sessions
*
*/
class SessionsSchema extends CakeSchema {
public $name = 'Sessions';
public function before($event = array()) {
return true;
}
public function after($event = array()) {
}
public $cake_sessions = array(
'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'),
'data' => array('type'=>'text', 'null' => true, 'default' => NULL),
'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
}
| 0001-bee | trunk/cakephp2/app/Config/Schema/sessions.php | PHP | gpl3 | 1,354 |
<?php
App::uses('AppModel', 'Model');
/**
* User Model
*
* @property Bid $Bid
* @property Comment $Comment
* @property Education $Education
* @property Job $Job
* @property Message $Message
* @property Post $Post
* @property Profile $Profile
* @property Message $Message
* @property Friend $Friend
* @property Language $Language
*/
class Friend extends AppModel {
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $useTable = 'users';
/**
* hasAndBelongsToMany associations
*
* @var array
*/
public $hasAndBelongsToMany = array(
'User' => array(
'className' => 'User',
'joinTable' => 'users_friends',
'foreignKey' => 'friend_id',
'associationForeignKey' => 'user_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Friend.php | PHP | gpl3 | 1,011 |
<?php
App::uses('AppModel', 'Model');
/**
* Post Model
*
* @property User $User
* @property Comment $Comment
*/
class Post extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
/**
* hasMany associations
*
* @var array
*/
public $hasMany = array(
'Comment' => array(
'className' => 'Comment',
'foreignKey' => 'post_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Post.php | PHP | gpl3 | 1,309 |
<?php
App::uses('AppModel', 'Model');
/**
* Bid Model
*
* @property Job $Job
* @property User $User
*/
class Bid extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'job_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'Job' => array(
'className' => 'Job',
'foreignKey' => 'job_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Bid.php | PHP | gpl3 | 1,399 |
<?php
App::uses('AppModel', 'Model');
/**
* Language Model
*
* @property Source $Source
* @property Destination $Destination
* @property User $User
*/
class Language extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'source_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'destination_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'Source' => array(
'className' => 'Source',
'foreignKey' => 'source_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Destination' => array(
'className' => 'Destination',
'foreignKey' => 'destination_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
/**
* hasAndBelongsToMany associations
*
* @var array
*/
public $hasAndBelongsToMany = array(
'User' => array(
'className' => 'User',
'joinTable' => 'users_languages',
'foreignKey' => 'language_id',
'associationForeignKey' => 'user_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Language.php | PHP | gpl3 | 1,973 |
<?php
App::uses('AppModel', 'Model');
/**
* Source Model
*
* @property Language $Language
*/
class Source extends AppModel {
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* hasMany associations
*
* @var array
*/
public $hasMany = array(
'Language' => array(
'className' => 'Language',
'foreignKey' => 'source_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Source.php | PHP | gpl3 | 636 |
<?php
/**
* MeioUpload Behavior
* This behavior is based on Tane Piper's improved uplaod behavior (http://digitalspaghetti.tooum.net/switchboard/blog/2497:Upload_Behavior_for_CakePHP_12)
* @author Vinicius Mendes (vbmendes@gmail.com)
* @link http://www.meiocodigo.com
* @filesource http://www.meiocodigo.com/meioupload
* @version 1.0.1
* @lastmodified 2008-10-04
*
* Usage:
* 1) Download this behaviour and place it in your models/behaviours/upload.php
* 2) If you require thumbnails for image generation, download Nate's phpThumb Component (http://bakery.cakephp.org/articles/view/phpthumb-component)
* 3) Insert the following SQL into your database. This is a basic model you can expand on:
* CREATE TABLE `images` (
* `id` int(8) unsigned NOT NULL auto_increment,
* `filename` varchar() default NULL,
* `dir` varchar(255) default NULL,
* `mimetype` varchar(255) NULL,
* `filesize` int(11) unsigned default NULL,
* `created` datetime default NULL,
* `modified` datetime default NULL,
* PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
* 4) In your model that you want to have the upload behavior work, place the below code. This example is for an Image model:
*
* var $actsAs = array('Upload' => array(
* 'filename' => array(
* 'dir' => 'files/images',
* 'create_directory' => false,
* 'allowed_mime' => array('image/jpeg', 'image/pjpeg', 'image/gif', 'image/png'),
* 'allowed_ext' => array('.jpg', '.jpeg', '.png', '.gif'),
* 'thumbsizes' => array(
* 'small' => array('width'=>100, 'height'=>100),
* 'medium' => array('width'=>220, 'height'=>220),
* 'large' => array('width'=>800, 'height'=>600)
* )
* )
* )
* );
* The above code will save the uploaded file's name in the 'filename' field in database,
* it will not overwrite existing files, instead it will create a new filename based on the original
* plus a counter.
* Allowed Mimetypes and extentions should be pretty explanitory.
* For thumbnails, when the file is uploaded, it will create 3 thumbnail sizes and prepend the name
* to the thumbfiles (i.e. image_001.jpg will produced thumb.small.image_001.jpg, thumb.medium.image_001.jpg, etc)
*
* 5) Create your upload view, make sure it's a multipart/form-data form, and the filename field is of type $form->file
* 6) Make sure your directory is at least CHMOD 775, also check your php.ini MAX_FILE_SIZE is enough to support the filesizes you are uploading
*
* Version Details
*
* 1.0.1
* + Fixed a bug in the create folder method
* + Now you can use the $validate var of the model to apply the changes to default validation rules;
* + Changed the my_array_merge function, now it's part of the behavior, name arrayMerge;
* + Allow use of {DS}, {model} and {field} constants in directory name and fields names;
* + Fixed a bug with the replacement of the default names.
*
* 1.0
* + Initial release.
*/
App::uses('Folder', 'Utility');
App::uses('File', 'Utility');
class MeioUploadBehavior extends ModelBehavior {
/**
* The default options for the behavior
*/
var $default_options = array(
'dir' => '',
'allowed_mime' => array(),
'allowed_ext' => array(),
'create_directory' => true,
'max_size' => 2097152,
'thumbsizes' => array(),
'default' => false,
'fields' => array(
'dir' => 'dir',
'filesize' => 'filesize',
'mimetype' => 'mimetype'
),
'validations' => array(
'FieldName' => array(
'rule' => array('uploadCheckFieldName'),
'check' => true,
'message' => 'Este campo não foi definido entre os parâmetros do MeioUploadBehavior.'
),
'Dir' => array(
'rule' => array('uploadCheckDir'),
'check' => true,
'message' => 'O diretório onde este arquivo seria colocado não existe ou é protegido contra escrita.'
),
'Empty' => array(
'rule' => array('uploadCheckEmpty'),
'check' => true,
'on' => 'create',
'message' => 'O arquivo não pode ser vazio'
),
'UploadError' => array(
'rule' => array('uploadCheckUploadError'),
'check' => true,
'message' => 'Ocorreram problemas no upload do arquivo.'
),
'MaxSize' => array(
'rule' => array('uploadCheckMaxSize'),
'check' => true,
'message' => 'O tamanho máximo de arquivo foi excedido.'
),
'InvalidMime' => array(
'rule' => array('uploadCheckInvalidMime'),
'check' => true,
'message' => 'Tipo de arquivo inválido.'
),
'InvalidExt' => array(
'rule' => array('uploadCheckInvalidExt'),
'check' => true,
'message' => 'Extensão de arquivo inválida.'
)
)
);
var $default_validations = array(
'FieldName' => array(
'rule' => array('uploadCheckFieldName'),
'check' => true,
'message' => 'Este campo não foi definido entre os parâmetros do MeioUploadBehavior.'
),
'Dir' => array(
'rule' => array('uploadCheckDir'),
'check' => true,
'message' => 'O diretório onde este arquivo seria colocado não existe ou é protegido contra escrita.'
),
'Empty' => array(
'rule' => array('uploadCheckEmpty'),
'check' => true,
'on' => 'create',
'message' => 'O arquivo não pode ser vazio'
),
'UploadError' => array(
'rule' => array('uploadCheckUploadError'),
'check' => true,
'message' => 'Ocorreram problemas no upload do arquivo.'
),
'MaxSize' => array(
'rule' => array('uploadCheckMaxSize'),
'check' => true,
'message' => 'O tamanho máximo de arquivo foi excedido.'
),
'InvalidMime' => array(
'rule' => array('uploadCheckInvalidMime'),
'check' => true,
'message' => 'Tipo de arquivo inválido.'
),
'InvalidExt' => array(
'rule' => array('uploadCheckInvalidExt'),
'check' => true,
'message' => 'Extensão de arquivo inválida.'
)
);
/**
* The message for move error.
*/
var $moveErrorMsg = 'Ocorreram problemas na cópia do arquivo.';
/**
* The array that saves the $options for the behavior
*/
var $__fields = array();
/**
* Patterns of reserved words
*/
var $patterns = array(
"thumb",
"default"
);
/**
* Words to replace the patterns of reserved words
*/
var $replacements = array(
"t_umb",
"d_fault"
);
/**
* Array of files to be removed on the afterSave callback
*/
var $__filesToRemove = array();
/**
* Setup the behavior. It stores a reference to the model, merges the default options with the options for each field, and setup the validation rules.
*
* @author Vinicius Mendes
* @return null
* @param $model Object
* @param $config Array[optional]
*/
function setup(&$model, $config=array()) {
$this->Folder = &new Folder;
$this->__model = $model;
$this->__fields = array();
foreach($config as $field => $options) {
// Check if given field exists
if(!$model->hasField($field)) {
trigger_error('MeioUploadBehavior Error: The field "'.$field.'" doesn\'t exists in the model "'.$model->name.'".', E_USER_WARNING);
}
// Merge given options with defaults
$options = $this->arrayMerge($this->default_options, $options);
// Including the default name to the replacements
if($options['default']){
if(!preg_match('/^.+\..+$/',$options['default'])){
trigger_error('MeioUploadBehavior Error: The default option must be the filename with extension.', E_USER_ERROR);
}
$this->_includeDefaultReplacement($options['default']);
}
// Verifies if the thumbsizes names is alphanumeric
foreach($options['thumbsizes'] as $name => $size){
if(!preg_match('/^[0-9a-zA-Z]+$/',$name)){
trigger_error('MeioUploadBehavior Error: The thumbsizes names must be alphanumeric.', E_USER_ERROR);
}
}
// Process the max_size if it is not numeric
$options['max_size'] = $this->sizeToBytes($options['max_size']);
$this->__fields[$field] = $options;
// Generate temporary directory if none provided
if(empty($options['dir'])) {
$this->__fields[$field]['dir'] = 'uploads' . DS . $model->name;
// Else replace the tokens of the dir.
} else {
$this->__fields[$field]['dir'] = $this->replaceTokens($options['dir'],$field);
}
// Replace tokens in the fields names.
foreach($this->__fields[$field]['fields'] as $fieldToken => $fieldName){
$this->__fields[$field]['fields'][$fieldToken] = $this->replaceTokens($fieldName,$field);
}
// Check that the given directory does not have a DS on the end
if($options['dir'][strlen($options['dir'])-1] == DS) {
$options['dir'] = substr($options['dir'],0,strlen($options['dir'])-2);
}
}
}
/**
* Merges two arrays recursively
*
* @author Vinicius Mendes
* @return Array
* @param $arr Array
* @param $ins Array
*/
function arrayMerge($arr, $ins) {
if (is_array($arr)) {
if (is_array($ins)) {
foreach ($ins as $k=>$v) {
if (isset($arr[$k])&&is_array($v)&&is_array($arr[$k])) {
$arr[$k] = $this->arrayMerge($arr[$k],$v);
}
else $arr[$k] = $v;
}
}
} elseif (!is_array($arr)&&(strlen($arr)==0||$arr==0)) {
$arr=$ins;
}
return($arr);
}
/**
* Replaces some tokens. {model} to the underscore version of the model name, {field} to the field name, {DS}. / or \ to DS constant value.
*
* @author Vinicius Mendes
* @return String
* @param $string String
* @param $fieldName String
*/
function replaceTokens($string,$fieldName){
return str_replace(array('{model}', '{field}', '{DS}','/','\\'),array(Inflector::underscore($this->__model->name),$fieldName,DS,DS,DS),$string);
}
/**
* Convert a size value to bytes. For example: 2 MB to 2097152.
*
* @author Vinicius Mendes
* @return int
* @param $size String
*/
function sizeToBytes($size){
if(is_numeric($size)) return $size;
if(!preg_match('/^[1-9][0-9]* (kb|mb|gb|tb)$/i', $size)){
trigger_error('MeioUploadBehavior Error: The max_size option format is invalid.', E_USER_ERROR);
return 0;
}
list($size, $unit) = explode(' ',$size);
if(strtolower($unit) == 'kb') return $size*1024;
if(strtolower($unit) == 'mb') return $size*1048576;
if(strtolower($unit) == 'gb') return $size*1073741824;
if(strtolower($unit) == 'tb') return $size*1099511627776;
trigger_error('MeioUploadBehavior Error: The max_size unit is invalid.', E_USER_ERROR);
return 0;
}
/**
* Sets the validation for each field, based on the options.
*
* @author Vinicius Mendes
* @return null
* @param $fieldName String
* @param $options Array
*/
function setupValidation($fieldName, $options){
$options = $this->__fields[$fieldName];
if(isset($this->__model->validate[$fieldName])){
if(isset($this->__model->validate[$fieldName]['rule'])){
$this->__model->validate[$fieldName] = array(
'oldValidation' => $this->__model->validates[$fieldName]
);
}
} else {
$this->__model->validate[$fieldName] = array();
}
$this->__model->validate[$fieldName] = $this->arrayMerge($this->default_validations,$this->__model->validate[$fieldName]);
$this->__model->validate[$fieldName] = $this->arrayMerge($options['validations'],$this->__model->validate[$fieldName]);
}
/**
* Checks if the field was declared in the MeioUpload Behavior setup
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckFieldName(&$model, $data,$other){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['FieldName']['check']) return true;
if(isset($this->__fields[$fieldName])){
return true;
} else {
$this->log('UploadBehavior Error: The field "'.$fieldName.'" wasn\'t declared as part of the UploadBehavior in model "'.$model->name.'".');
return false;
}
}
return true;
}
/**
* Checks if the folder exists or can be created or writable.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckDir(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['Dir']['check']) return true;
$options = $this->__fields[$fieldName];
if(empty($field['remove']) || empty($field['name'])){
// Check if directory exists and create it if required
if(!is_dir($options['dir'])) {
if($options['create_directory']){
if(!$this->Folder->mkdir($options['dir'])) {
trigger_error('UploadBehavior Error: The directory '.$options['dir'].' does not exist and cannot be created.', E_USER_WARNING);
return false;
}
} else {
trigger_error('UploadBehavior Error: The directory'.$options['dir'].' does not exist.', E_USER_WARNING);
return false;
}
}
// Check if directory is writable
if(!is_writable($options['dir'])) {
trigger_error('UploadBehavior Error: The directory '.$options['dir'].' isn\'t writable.', E_USER_WARNING);
return false;
}
}
}
return true;
}
/**
* Checks if the filename is not empty.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckEmpty(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['Empty']['check']) return true;
if(empty($field['remove'])){
if(!is_array($field) || empty($field['name'])){
return false;
}
}
}
return true;
}
/**
* Checks if ocurred erros in the upload.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckUploadError(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['UploadError']['check']) return true;
if(!empty($field['name']) && $field['error'] > 0){
return false;
}
}
return true;
}
/**
* Checks if the file isn't bigger then the max file size option.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckMaxSize(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['MaxSize']['check']) return true;
$options = $this->__fields[$fieldName];
if(!empty($field['name']) && $field['size'] > $options['max_size']) {
return false;
}
}
return true;
}
/**
* Checks if the file is of an allowed mime-type.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckInvalidMime(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['InvalidMime']['check']) return true;
$options = $this->__fields[$fieldName];
if(!empty($field['name']) && count($options['allowed_mime']) > 0 && !in_array($field['type'], $options['allowed_mime'])) {
return false;
}
}
return true;
}
/**
* Checks if the file has an allowed extension.
*
* @author Vinicius Mendes
* @return boolean
* @param $model Object
* @param $data Array
*/
function uploadCheckInvalidExt(&$model, $data){
foreach($data as $fieldName => $field){
if(!$this->__model->validate[$fieldName]['InvalidExt']['check']) return true;
$options = $this->__fields[$fieldName];
if(!empty($field['name'])){
if(count($options['allowed_ext']) > 0) {
$matches = 0;
foreach($options['allowed_ext'] as $extension) {
if(substr($field['name'],-strlen($extension)) == $extension) {
$matches++;
}
}
if($matches == 0) {
return false;
}
}
}
}
return true;
}
/**
* Set a file to be removed in afterSave callback
*
* @author Vinicius Mendes
* @return null
* @param $fieldName String
*/
function setFileToRemove($fieldName){
$filename = $this->__model->field($fieldName);
if(!empty($filename) && $filename != $this->__fields[$fieldName]['default']){
$this->__filesToRemove[] = array(
'dir' => $this->__fields[$fieldName]['dir'],
'name' => $filename
);
}
}
/**
* Include a pattern of reserved word based on a filename, and it's replacement.
*
* @author Vinicius Mendes
* @return null
* @param $default String
*/
function _includeDefaultReplacement($default){
$replacements = $this->replacements;
list($newPattern, $ext) = $this->splitFilenameAndExt($default);
if(!in_array($newPattern, $this->patterns)){
$this->patterns[] = $newPattern;
$newReplacement = $newPattern;
if(isset($newReplacement[1])){
if($newReplacement[1] != '_'){
$newReplacement[1] = '_';
} else {
$newReplacement[1] = 'a';
}
} elseif($newReplacement != '_') {
$newReplacement = '_';
} else {
$newReplacement = 'a';
}
$this->replacements[] = $newReplacement;
}
}
/**
* Removes the bad characters from the $filename and replace reserved words. It updates the $model->data.
*
* @author Vinicius Mendes
* @return null
* @param $fieldName String
*/
function fixName($fieldName){
// updates the filename removing the keywords thumb and default name for the field.
list($filename, $ext) = $this->splitFilenameAndExt($this->__model->data[$this->__model->name][$fieldName]['name']);
$filename = str_replace($this->patterns,$this->replacements,$filename);
$filename = Inflector::slug($filename);
$i = 0;
$newFilename = $filename;
while(file_exists($this->__fields[$fieldName]['dir'].DS.$newFilename.'.'.$ext)){
$newFilename = $filename.$i;
$i++;
}
$this->__model->data[$this->__model->name][$fieldName]['name'] = $newFilename.'.'.$ext;
}
/**
* Splits a filename in two parts: the name and the extension. Returns an array with it respectively.
*
* @author Vinicius Mendes
* @return Array
* @param $filename String
*/
function splitFilenameAndExt($filename){
$parts = explode('.',$filename);
$ext = $parts[count($parts)-1];
unset($parts[count($parts)-1]);
$filename = implode('.',$parts);
return array($filename,$ext);
}
/**
* Sets the validation rules for each field.
*
* @return true
* @param $model Object
*/
function beforeValidate(&$model) {
foreach($this->__fields as $fieldName=>$options){
$this->setupValidation($fieldName, $options);
}
return true;
}
/**
* Uploads the files before saving the record.
*
* @author Vinicius Mendes
* @param $model Object
*/
function beforeSave(&$model) {
foreach($this->__fields as $fieldName=>$options){
// if the file is marked to be deleted, use the default or set the field to null
if(!empty($model->data[$model->name][$fieldName]['remove'])){
if($options['default']){
$model->data[$model->name][$fieldName] = $options['default'];
} else {
$model->data[$model->name][$fieldName] = null;
}
//if the record is already saved in the database, set the existing file to be removed after the save is sucessfull
if(!empty($model->data[$model->name][$model->primaryKey])){
$this->setFileToRemove($fieldName);
}
continue;
}
// If no file has been upload, then unset the field to avoid overwriting existant file
if(!isset($model->data[$model->name][$fieldName]) || !is_array($model->data[$model->name][$fieldName]) || empty($model->data[$model->name][$fieldName]['name'])){
if(!empty($model->data[$model->name][$model->primaryKey]) || !$options['default']){
unset($model->data[$model->name][$fieldName]);
} else {
$model->data[$model->name][$fieldName] = $options['default'];
}
continue;
}
//if the record is already saved in the database, set the existing file to be removed after the save is sucessfull
if(!empty($model->data[$model->name][$model->primaryKey])){
$this->setFileToRemove($fieldName);
}
// Fix the filename, removing bad characters and avoiding from overwriting existing ones
$this->_includeDefaultReplacement($options['default']);
$this->fixName($fieldName);
$saveAs = $options['dir'].DS.$model->data[$model->name][$fieldName]['name'];
// Attempt to move uploaded file
if(!move_uploaded_file($model->data[$model->name][$fieldName]['tmp_name'], $saveAs)){
$model->validationErrors[$field] = $moveErrorMsg;
return false;
}
// It the file is an image, try to make the thumbnails
if (count($options['allowed_ext']) > 0 && in_array($model->data[$model->name][$fieldName]['type'], array('image/jpeg', 'image/pjpeg', 'image/png'))) {
foreach ($options['thumbsizes'] as $key => $value) {
// If a 'normal' thumbnail is set, then it will overwrite the original file
if($key == 'normal'){
$thumbSaveAs = $saveAs;
// Otherwise, set the thumb filename to thumb.$key.$filename.$ext
} else {
$thumbSaveAs = $options['dir'].DS.'thumb.'.$key.'.'.$model->data[$model->name][$fieldName]['name'];
}
$this->createthumb($saveAs, $thumbSaveAs, $value['width'], $value['height']);
}
}
// Update model data
$model->data[$model->name][$options['fields']['dir']] = $options['dir'];
$model->data[$model->name][$options['fields']['mimetype']] = $model->data[$model->name][$fieldName]['type'];
$model->data[$model->name][$options['fields']['filesize']] = $model->data[$model->name][$fieldName]['size'];
$model->data[$model->name][$fieldName] = $model->data[$model->name][$fieldName]['name'];
}
return true;
}
/**
* Deletes the files marked to be deleted in the save method. A file can be marked to be deleted if it is overwriten by another or if the user mark it to be deleted.
*
* @author Vinicius Mendes
* @param $model Object
*/
function afterSave(&$model) {
foreach($this->__filesToRemove as $file){
if($file['name'])
$this->_deleteFiles($file['name'], $file['dir']);
}
// Reset the filesToRemove array
$this->__filesToRemove = array();
}
/**
* Deletes all files associated with the record beforing delete it.
*
* @author Vinicius Mendes
* @param $model Object
*/
function beforeDelete(&$model) {
$model->read(null, $model->id);
if(isset($model->data)) {
foreach($this->__fields as $field=>$options) {
$file = $model->data[$model->name][$field];
if($file && $file != $options['default'])
$this->_deleteFiles($file, $options['dir']);
}
}
return true;
}
/**
* Delete the $filename inside the $dir and the thumbnails.
* Returns true if the file is deleted and false otherwise.
*
* @author Vinicius Mendes
* @return boolean
* @param $filename Object
* @param $dir Object
*/
function _deleteFiles($filename, $dir){
$saveAs = $dir . DS . $filename;
if(is_file($saveAs) && !unlink($saveAs))
{
return false;
}
$folder = &new Folder($dir);
$files = $folder->find('thumb\.[a-zA-Z0-9]+\.'.$filename);
foreach($files as $f) unlink($dir.DS.$f);
return true;
}
// Function to create thumbnail image
// This requires Nate Constant's thumbnail generator for PHPThumb
// http://bakery.cakephp.org/articles/view/phpthumb-component
// Thi function is original from digital spaghetti's version
function createthumb($name, $filename, $new_w, $new_h)
{
App::import('Component', 'Thumb');
$system = explode(".", $name);
if (preg_match("/jpg|jpeg/", $system[1]))
{
$src_img = imagecreatefromjpeg($name);
}
if (preg_match("/png/", $system[1]))
{
$src_img = imagecreatefrompng($name);
}
$old_x = imagesx($src_img);
$old_y = imagesy($src_img);
if ($old_x >= $old_y)
{
$thumb_w = $new_w;
$ratio = $old_y / $old_x;
$thumb_h = $ratio * $new_w;
} else if ($old_x < $old_y) {
$thumb_h = $new_h;
$ratio = $old_x / $old_y;
$thumb_w = $ratio * $new_h;
}
$dst_img = imagecreatetruecolor($thumb_w, $thumb_h);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);
if (preg_match("/png/", $system[1]))
{
imagepng($dst_img, $filename);
} else {
imagejpeg($dst_img, $filename);
}
imagedestroy($dst_img);
imagedestroy($src_img);
}
}
?>
| 0001-bee | trunk/cakephp2/app/Model/Behavior/meio_upload.php | PHP | gpl3 | 24,182 |
<?php
/*
* jQuery File Upload Plugin PHP Example 5.2.9
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://creativecommons.org/licenses/MIT/
*/
class UploadBehavior extends ModelBehavior
{
private $options;
function __construct($options=null) {
$this->options = array(
'script_url' => $_SERVER['PHP_SELF'],
'upload_dir' => dirname(__FILE__).DS.'img'.DS.'files'.DS,
'upload_url' => dirname($_SERVER['PHP_SELF']).DS.'img'.DS.'files'.DS,
'param_name' => 'files',
// The php.ini settings upload_max_filesize and post_max_size
// take precedence over the following max_file_size setting:
'max_file_size' => null,
'min_file_size' => 1,
'accept_file_types' => '/.+$/i',
'max_number_of_files' => null,
'discard_aborted_uploads' => true,
'image_versions' => array(
// Uncomment the following version to restrict the size of
// uploaded images. You can also add additional versions with
// their own upload directories:
/*
'large' => array(
'upload_dir' => dirname(__FILE__).'/files/',
'upload_url' => dirname($_SERVER['PHP_SELF']).'/files/',
'max_width' => 1920,
'max_height' => 1200
),
*/
'thumbnail' => array(
'upload_dir' => dirname(__FILE__).'/img/thumbnails/',
'upload_url' => dirname($_SERVER['PHP_SELF']).'/img/thumbnails/',
'max_width' => 80,
'max_height' => 80
)
)
);
if ($options) {
$this->options = array_replace_recursive($this->options, $options);
}
}
private function get_file_object($file_name) {
$file_path = $this->options['upload_dir'].$file_name;
if (is_file($file_path) && $file_name[0] !== '.') {
$file = new stdClass();
$file->name = $file_name;
$file->size = filesize($file_path);
$file->url = $this->options['upload_url'].rawurlencode($file->name);
foreach($this->options['image_versions'] as $version => $options) {
if (is_file($options['upload_dir'].$file_name)) {
$file->{$version.'_url'} = $options['upload_url']
.rawurlencode($file->name);
}
}
$file->delete_url = $this->options['script_url']
.'?file='.rawurlencode($file->name);
$file->delete_type = 'DELETE';
return $file;
}
return null;
}
private function get_file_objects() {
return array_values(array_filter(array_map(
array($this, 'get_file_object'),
scandir($this->options['upload_dir'])
)));
}
private function create_scaled_image($file_name, $options) {
$file_path = $this->options['upload_dir'].$file_name;
$new_file_path = $options['upload_dir'].$file_name;
list($img_width, $img_height) = @getimagesize($file_path);
if (!$img_width || !$img_height) {
return false;
}
$scale = min(
$options['max_width'] / $img_width,
$options['max_height'] / $img_height
);
if ($scale > 1) {
$scale = 1;
}
$new_width = $img_width * $scale;
$new_height = $img_height * $scale;
$new_img = @imagecreatetruecolor($new_width, $new_height);
switch (strtolower(substr(strrchr($file_name, '.'), 1))) {
case 'jpg':
case 'jpeg':
$src_img = @imagecreatefromjpeg($file_path);
$write_image = 'imagejpeg';
break;
case 'gif':
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
$src_img = @imagecreatefromgif($file_path);
$write_image = 'imagegif';
break;
case 'png':
@imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
@imagealphablending($new_img, false);
@imagesavealpha($new_img, true);
$src_img = @imagecreatefrompng($file_path);
$write_image = 'imagepng';
break;
default:
$src_img = $image_method = null;
}
$success = $src_img && @imagecopyresampled(
$new_img,
$src_img,
0, 0, 0, 0,
$new_width,
$new_height,
$img_width,
$img_height
) && $write_image($new_img, $new_file_path);
// Free up memory (imagedestroy does not delete files):
@imagedestroy($src_img);
@imagedestroy($new_img);
return $success;
}
private function has_error($uploaded_file, $file, $error) {
if ($error) {
return $error;
}
if (!preg_match($this->options['accept_file_types'], $file->name)) {
return 'acceptFileTypes';
}
if ($uploaded_file && is_uploaded_file($uploaded_file)) {
$file_size = filesize($uploaded_file);
} else {
$file_size = $_SERVER['CONTENT_LENGTH'];
}
if ($this->options['max_file_size'] && (
$file_size > $this->options['max_file_size'] ||
$file->size > $this->options['max_file_size'])
) {
return 'maxFileSize';
}
if ($this->options['min_file_size'] &&
$file_size < $this->options['min_file_size']) {
return 'minFileSize';
}
if (is_int($this->options['max_number_of_files']) && (
count($this->get_file_objects()) >= $this->options['max_number_of_files'])
) {
return 'maxNumberOfFiles';
}
return $error;
}
private function trim_file_name($name, $type) {
// Remove path information and dots around the filename, to prevent uploading
// into different directories or replacing hidden system files.
// Also remove control characters and spaces (\x00..\x20) around the filename:
$file_name = trim(basename(stripslashes($name)), ".\x00..\x20");
// Add missing file extension for known image types:
if (strpos($file_name, '.') === false &&
preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
$file_name .= '.'.$matches[1];
}
return $file_name;
}
private function handle_file_upload($uploaded_file, $name, $size, $type, $error) {
$file = new stdClass();
$file->name = $this->trim_file_name($name, $type);
$file->size = intval($size);
$file->type = $type;
$error = $this->has_error($uploaded_file, $file, $error);
if (!$error && $file->name) {
$file_path = $this->options['upload_dir'].$file->name;
$append_file = !$this->options['discard_aborted_uploads'] &&
is_file($file_path) && $file->size > filesize($file_path);
clearstatcache();
if ($uploaded_file && is_uploaded_file($uploaded_file)) {
// multipart/formdata uploads (POST method uploads)
if ($append_file) {
file_put_contents(
$file_path,
fopen($uploaded_file, 'r'),
FILE_APPEND
);
} else {
move_uploaded_file($uploaded_file, $file_path);
}
} else {
// Non-multipart uploads (PUT method support)
file_put_contents(
$file_path,
fopen('php://input', 'r'),
$append_file ? FILE_APPEND : 0
);
}
$file_size = filesize($file_path);
if ($file_size === $file->size) {
$file->url = $this->options['upload_url'].rawurlencode($file->name);
foreach($this->options['image_versions'] as $version => $options) {
if ($this->create_scaled_image($file->name, $options)) {
$file->{$version.'_url'} = $options['upload_url']
.rawurlencode($file->name);
}
}
} else if ($this->options['discard_aborted_uploads']) {
unlink($file_path);
$file->error = 'abort';
}
$file->size = $file_size;
$file->delete_url = $this->options['script_url']
.'?file='.rawurlencode($file->name);
$file->delete_type = 'DELETE';
} else {
$file->error = $error;
}
return $file;
}
public function get() {
$file_name = isset($_REQUEST['file']) ?
basename(stripslashes($_REQUEST['file'])) : null;
if ($file_name) {
$info = $this->get_file_object($file_name);
} else {
$info = $this->get_file_objects();
}
header('Content-type: application/json');
echo json_encode($info);
}
public function post() {
$upload = isset($_FILES[$this->options['param_name']]) ?
$_FILES[$this->options['param_name']] : null;
$info = array();
if ($upload && is_array($upload['tmp_name'])) {
foreach ($upload['tmp_name'] as $index => $value) {
$info[] = $this->handle_file_upload(
$upload['tmp_name'][$index],
isset($_SERVER['HTTP_X_FILE_NAME']) ?
$_SERVER['HTTP_X_FILE_NAME'] : $upload['name'][$index],
isset($_SERVER['HTTP_X_FILE_SIZE']) ?
$_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'][$index],
isset($_SERVER['HTTP_X_FILE_TYPE']) ?
$_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'][$index],
$upload['error'][$index]
);
}
} elseif ($upload) {
$info[] = $this->handle_file_upload(
$upload['tmp_name'],
isset($_SERVER['HTTP_X_FILE_NAME']) ?
$_SERVER['HTTP_X_FILE_NAME'] : $upload['name'],
isset($_SERVER['HTTP_X_FILE_SIZE']) ?
$_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'],
isset($_SERVER['HTTP_X_FILE_TYPE']) ?
$_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'],
$upload['error']
);
}
header('Vary: Accept');
if (isset($_SERVER['HTTP_ACCEPT']) &&
(strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) {
header('Content-type: application/json');
} else {
header('Content-type: text/plain');
}
echo json_encode($info);
}
public function delete() {
$file_name = isset($_REQUEST['file']) ?
basename(stripslashes($_REQUEST['file'])) : null;
$file_path = $this->options['upload_dir'].$file_name;
$success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path);
if ($success) {
foreach($this->options['image_versions'] as $version => $options) {
$file = $options['upload_dir'].$file_name;
if (is_file($file)) {
unlink($file);
}
}
}
header('Content-type: application/json');
echo json_encode($success);
}
}
?> | 0001-bee | trunk/cakephp2/app/Model/Behavior/upload.php | PHP | gpl3 | 11,966 |
<?php
App::uses('AppModel', 'Model');
/**
* Profile Model
*
* @property User $User
*/
class Profile extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Profile.php | PHP | gpl3 | 904 |
<?php
App::uses('AppModel', 'Model');
/**
* Comment Model
*
* @property User $User
* @property Post $Post
*/
class Comment extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'post_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Post' => array(
'className' => 'Post',
'foreignKey' => 'post_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Comment.php | PHP | gpl3 | 1,413 |
<?php
App::uses('AppModel', 'Model');
/**
* Photo Model
*
* @property PhotoGroup $PhotoGroup
*/
class Photo extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'photo_group_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'PhotoGroup' => array(
'className' => 'PhotoGroup',
'foreignKey' => 'photo_group_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Photo.php | PHP | gpl3 | 1,145 |
<?php
App::uses('AppModel', 'Model');
/**
* User Model
*
* @property Bid $Bid
* @property Comment $Comment
* @property Education $Education
* @property Job $Job
* @property Message $Message
* @property Post $Post
* @property Profile $Profile
* @property Message $Message
* @property Friend $Friend
* @property Language $Language
*/
class User extends AppModel {
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* hasMany associations
*
* @var array
*/
public $hasMany = array(
'Bid' => array(
'className' => 'Bid',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Comment' => array(
'className' => 'Comment',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Education' => array(
'className' => 'Education',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Job' => array(
'className' => 'Job',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Message' => array(
'className' => 'Message',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Post' => array(
'className' => 'Post',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Profile' => array(
'className' => 'Profile',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
/**
* hasAndBelongsToMany associations
*
* @var array
*/
public $hasAndBelongsToMany = array(
'Message' => array(
'className' => 'Message',
'joinTable' => 'messages_users',
'foreignKey' => 'user_id',
'associationForeignKey' => 'message_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
'Friend' => array(
'className' => 'Friend',
'joinTable' => 'users_friends',
'foreignKey' => 'user_id',
'associationForeignKey' => 'friend_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
'Language' => array(
'className' => 'Language',
'joinTable' => 'users_languages',
'foreignKey' => 'user_id',
'associationForeignKey' => 'language_id',
'unique' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/User.php | PHP | gpl3 | 3,838 |
<?php
App::uses('AppModel', 'Model');
/**
* UsersFriend Model
*
* @property User $User
* @property Friend $Friend
*/
class UsersFriend extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'friend_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'Friend' => array(
'className' => 'Friend',
'foreignKey' => 'friend_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/UsersFriend.php | PHP | gpl3 | 1,433 |
<?php
/**
* Application model for Cake.
*
* This file is application-wide model file. You can put all
* application-wide model-related methods here.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Model
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('Model', 'Model');
/**
* Application model for Cake.
*
* Add your application-wide methods in the class below, your models
* will inherit them.
*
* @package app.Model
*/
class AppModel extends Model {
}
| 0001-bee | trunk/cakephp2/app/Model/AppModel.php | PHP | gpl3 | 961 |
<?php
App::uses('AppModel', 'Model');
/**
* Education Model
*
* @property User $User
* @property EduType $EduType
*/
class Education extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'user_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
'edu_type_id' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations
),
),
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* belongsTo associations
*
* @var array
*/
public $belongsTo = array(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'EduType' => array(
'className' => 'EduType',
'foreignKey' => 'edu_type_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}
| 0001-bee | trunk/cakephp2/app/Model/Education.php | PHP | gpl3 | 1,437 |