mirror of
https://github.com/brmlab/brmbiolab_sklad.git
synced 2025-10-30 15:04:02 +01:00
Initial commit
This commit is contained in:
commit
3b93da31de
1004 changed files with 265840 additions and 0 deletions
34
lib/Cake/Test/test_app/Model/AppModel.php
Normal file
34
lib/Cake/Test/test_app/Model/AppModel.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* Application model for Cake.
|
||||
*
|
||||
* This file is application-wide model file. You can put all
|
||||
* application-wide model-related methods here.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Model
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Model', 'Model');
|
||||
|
||||
/**
|
||||
* Application model for Cake.
|
||||
*
|
||||
* This is a placeholder class.
|
||||
* Create the same file in app/Model/AppModel.php
|
||||
* Add your application-wide methods to the class, your models will inherit them.
|
||||
*
|
||||
* @package Cake.Model
|
||||
*/
|
||||
class AppModel extends Model {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* Behavior for binding management.
|
||||
*
|
||||
* Behavior to simplify manipulating a model's bindings when doing a find operation
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Test.TestApp.Model.Behavior
|
||||
* @since CakePHP(tm) v 1.2.0.5669
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
|
||||
* the amount of associations and data returned.
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model.Behavior
|
||||
*/
|
||||
class PersisterOneBehaviorBehavior extends ModelBehavior {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* Behavior for binding management.
|
||||
*
|
||||
* Behavior to simplify manipulating a model's bindings when doing a find operation
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package Cake.Test.TestApp.Model.Behavior
|
||||
* @since CakePHP(tm) v 1.2.0.5669
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting
|
||||
* the amount of associations and data returned.
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model.Behavior
|
||||
*/
|
||||
class PersisterTwoBehaviorBehavior extends ModelBehavior {
|
||||
}
|
||||
33
lib/Cake/Test/test_app/Model/Comment.php
Normal file
33
lib/Cake/Test/test_app/Model/Comment.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Test App Comment Model
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP Project
|
||||
* @package Cake.Test.TestApp.Model
|
||||
* @since CakePHP v 1.2.0.7726
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Comment Model
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model
|
||||
*/
|
||||
class Comment extends AppModel {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useTable = 'comments';
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
App::uses('TestSource', 'TestPlugin.Model/Datasource');
|
||||
|
||||
class TestLocalDriver extends TestSource {
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* Test suite app/Model/Datasource/Session session handler
|
||||
*
|
||||
*/
|
||||
|
||||
App::uses('CakeSessionHandlerInterface', 'Model/Datasource/Session');
|
||||
|
||||
class TestAppLibSession implements CakeSessionHandlerInterface {
|
||||
|
||||
public function open() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function close() {
|
||||
}
|
||||
|
||||
public function read($id) {
|
||||
}
|
||||
|
||||
public function write($id, $data) {
|
||||
}
|
||||
|
||||
public function destroy($id) {
|
||||
}
|
||||
|
||||
public function gc($expires = null) {
|
||||
}
|
||||
|
||||
}
|
||||
27
lib/Cake/Test/test_app/Model/Datasource/Test2OtherSource.php
Normal file
27
lib/Cake/Test/test_app/Model/Datasource/Test2OtherSource.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
class Test2OtherSource extends DataSource {
|
||||
|
||||
public function describe($model) {
|
||||
return compact('model');
|
||||
}
|
||||
|
||||
public function listSources($data = null) {
|
||||
return array('test_source');
|
||||
}
|
||||
|
||||
public function create(Model $model, $fields = null, $values = null) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
public function read(Model $model, $queryData = array(), $recursive = null) {
|
||||
return compact('model', 'queryData');
|
||||
}
|
||||
|
||||
public function update(Model $model, $fields = array(), $values = array(), $conditions = null) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
public function delete(Model $model, $id = null) {
|
||||
return compact('model', 'id');
|
||||
}
|
||||
}
|
||||
27
lib/Cake/Test/test_app/Model/Datasource/Test2Source.php
Normal file
27
lib/Cake/Test/test_app/Model/Datasource/Test2Source.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
class Test2Source extends DataSource {
|
||||
|
||||
public function describe($model) {
|
||||
return compact('model');
|
||||
}
|
||||
|
||||
public function listSources($data = null) {
|
||||
return array('test_source');
|
||||
}
|
||||
|
||||
public function create(Model $model, $fields = null, $values = null) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
public function read(Model $model, $queryData = array(), $recursive = null) {
|
||||
return compact('model', 'queryData');
|
||||
}
|
||||
|
||||
public function update(Model $model, $fields = array(), $values = array(), $conditions = null) {
|
||||
return compact('model', 'fields', 'values');
|
||||
}
|
||||
|
||||
public function delete(Model $model, $id = null) {
|
||||
return compact('model', 'id');
|
||||
}
|
||||
}
|
||||
45
lib/Cake/Test/test_app/Model/Extract.php
Normal file
45
lib/Cake/Test/test_app/Model/Extract.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Test App Extract Model
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP Project
|
||||
* @package Cake.Test.TestApp.Model
|
||||
* @since CakePHP v 2.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Extract
|
||||
*
|
||||
* For testing Console i18n validation message extraction with quotes
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model
|
||||
*/
|
||||
class Extract extends AppModel {
|
||||
|
||||
public $useTable = false;
|
||||
|
||||
public $validate = array(
|
||||
'title' => array(
|
||||
'custom' => array(
|
||||
'rule' => array('custom', '.*'),
|
||||
'allowEmpty' => true,
|
||||
'required' => false,
|
||||
'message' => 'double "quoted" validation'
|
||||
),
|
||||
'between' => array(
|
||||
'rule' => array('between', 5, 15),
|
||||
'message' => "single 'quoted' validation"
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
61
lib/Cake/Test/test_app/Model/PersisterOne.php
Normal file
61
lib/Cake/Test/test_app/Model/PersisterOne.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
/**
|
||||
* Test App Comment Model
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP Project
|
||||
* @package Cake.Test.TestApp.Model
|
||||
* @since CakePHP v 1.2.0.7726
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class PersisterOne
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model
|
||||
*/
|
||||
class PersisterOne extends AppModel {
|
||||
|
||||
public $useTable = 'posts';
|
||||
|
||||
public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne');
|
||||
|
||||
public $hasMany = array('Comment', 'TestPlugin.TestPluginComment');
|
||||
|
||||
public $validate = array(
|
||||
'title' => array(
|
||||
'custom' => array(
|
||||
'rule' => array('custom', '.*'),
|
||||
'allowEmpty' => true,
|
||||
'required' => false,
|
||||
'message' => 'Post title is required'
|
||||
),
|
||||
'between' => array(
|
||||
'rule' => array('between', 5, 15),
|
||||
'message' => array('You may enter up to %s chars (minimum is %s chars)', 14, 6)
|
||||
)
|
||||
),
|
||||
'body' => array(
|
||||
'first_rule' => array(
|
||||
'rule' => array('custom', '.*'),
|
||||
'allowEmpty' => true,
|
||||
'required' => false,
|
||||
'message' => 'Post body is required'
|
||||
),
|
||||
'second_rule' => array(
|
||||
'rule' => array('custom', '.*'),
|
||||
'allowEmpty' => true,
|
||||
'required' => false,
|
||||
'message' => 'Post body is super required'
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
32
lib/Cake/Test/test_app/Model/PersisterTwo.php
Normal file
32
lib/Cake/Test/test_app/Model/PersisterTwo.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Test App Comment Model
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP Project
|
||||
* @package Cake.Test.TestApp.Model
|
||||
* @since CakePHP v 1.2.0.7726
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class PersisterTwo
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model
|
||||
*/
|
||||
class PersisterTwo extends AppModel {
|
||||
|
||||
public $useTable = 'posts';
|
||||
|
||||
public $actsAs = array('PersisterOneBehavior', 'TestPlugin.TestPluginPersisterOne');
|
||||
|
||||
public $hasMany = array('Comment', 'TestPlugin.TestPluginComment');
|
||||
|
||||
}
|
||||
28
lib/Cake/Test/test_app/Model/Post.php
Normal file
28
lib/Cake/Test/test_app/Model/Post.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* Test App Comment Model
|
||||
*
|
||||
* CakePHP : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP Project
|
||||
* @package Cake.Test.TestApp.Model
|
||||
* @since CakePHP v 1.2.0.7726
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Post
|
||||
*
|
||||
* @package Cake.Test.TestApp.Model
|
||||
*/
|
||||
class Post extends AppModel {
|
||||
|
||||
public $useTable = 'posts';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue