Skip to content

Instantly share code, notes, and snippets.

@simkimsia
Created November 14, 2013 02:40
Show Gist options
  • Select an option

  • Save simkimsia/7460428 to your computer and use it in GitHub Desktop.

Select an option

Save simkimsia/7460428 to your computer and use it in GitHub Desktop.
Template of Behavior file in CakePHP Plugin
<?php
/**
* {ExampleBehavior} class file.
*
* {one line description}
*
* {elaboration of usage}
*
* Copyright {copyright year}, {maintainer}
* {Location}
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright {copyright year}, {maintainer}
* @link {website}
* @author {maintainer} <{maintainer email}>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @package {PluginName}
* @subpackage {PluginName}.Model.Behavior
* @version 0.1.0
*/
class {ExampleBehavior} extends ModelBehavior {
/**
* Behavior settings
*
* @access public
* @var array
*/
public $settings = array();
/**
* Initiate behavior for the model using specified settings.
*
* @param Model $Model
* @param array $config
* @return void
*/
public function setup(Model $Model, $settings = array()) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment