MINOR phpdoc documentation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-03-22 22:59:14 +00:00
parent a970382924
commit b12a00c391
38 changed files with 117 additions and 97 deletions

View File

@ -1,10 +1,11 @@
<?php <?php
/** /**
* A DataFormatter object handles transformation of data from Sapphire model objects to a particular output format, and vice versa. * A DataFormatter object handles transformation of data from Sapphire model objects to a particular output format, and vice versa.
* This is most commonly used in developing RESTful APIs. * This is most commonly used in developing RESTful APIs.
*
* @package sapphire
* @subpackage formatters
*/ */
abstract class DataFormatter extends Object { abstract class DataFormatter extends Object {
/** /**

View File

@ -1,5 +1,8 @@
<?php <?php
/**
* @package sapphire
* @subpackage formatters
*/
class JSONDataFormatter extends DataFormatter { class JSONDataFormatter extends DataFormatter {
/** /**
* @todo pass this from the API to the data formatter somehow * @todo pass this from the API to the data formatter somehow

View File

@ -1,7 +1,9 @@
<?php <?php
/** /**
* Simple wrapper to allow access to the live site via REST * Simple wrapper to allow access to the live site via REST
*
* @package sapphire
* @subpackage integration
*/ */
class VersionedRestfulServer extends Controller { class VersionedRestfulServer extends Controller {
function handleRequest($request) { function handleRequest($request) {

View File

@ -1,5 +1,8 @@
<?php <?php
/**
* @package sapphire
* @subpackage formatters
*/
class XMLDataFormatter extends DataFormatter { class XMLDataFormatter extends DataFormatter {
/** /**
* @todo pass this from the API to the data formatter somehow * @todo pass this from the API to the data formatter somehow

View File

@ -108,14 +108,14 @@ class ClassInfo {
* through the $class parameter as the first array value. * through the $class parameter as the first array value.
* *
* Example usage: * Example usage:
* <example> * <code>
* ClassInfo::subclassesFor('BaseClass'); * ClassInfo::subclassesFor('BaseClass');
* array( * array(
* 0 => 'BaseClass', * 0 => 'BaseClass',
* 'ChildClass' => 'ChildClass', * 'ChildClass' => 'ChildClass',
* 'GrandChildClass' => 'GrandChildClass' * 'GrandChildClass' => 'GrandChildClass'
* ) * )
* </example> * </code>
* *
* @param mixed $class string of the classname or instance of the class * @param mixed $class string of the classname or instance of the class
* @return array Names of all subclasses as an associative array. * @return array Names of all subclasses as an associative array.

View File

@ -17,7 +17,6 @@
* Objects of type {@link ViewableData} can have an "escaping type", * Objects of type {@link ViewableData} can have an "escaping type",
* which determines if they are automatically escaped before output by {@link SSViewer}. * which determines if they are automatically escaped before output by {@link SSViewer}.
* *
* @usedby ViewableData::XML_val()
* @package sapphire * @package sapphire
* @subpackage misc * @subpackage misc
*/ */

View File

@ -315,8 +315,6 @@ class Requirements_Backend {
/** /**
* Remembers the filepaths of all cleared Requirements * Remembers the filepaths of all cleared Requirements
* through {@link clear()}. * through {@link clear()}.
*
* @usedby {@link restore()}
* *
* @var array $disabled * @var array $disabled
*/ */

View File

@ -3,6 +3,9 @@
* Exception thrown by {@link DataObject}::write if validation fails. By throwing an * Exception thrown by {@link DataObject}::write if validation fails. By throwing an
* exception rather than a user error, the exception can be caught in unit tests and as such * exception rather than a user error, the exception can be caught in unit tests and as such
* can be used as a successful test. * can be used as a successful test.
*
* @package sapphire
* @subpackage validation
*/ */
class ValidationException extends Exception { class ValidationException extends Exception {

View File

@ -281,7 +281,6 @@ class ViewableData extends Object implements IteratorAggregate {
/** /**
* Return the string-format type for the given field. * Return the string-format type for the given field.
* *
* @usedby ViewableData::XML_val()
* @param string $fieldName * @param string $fieldName
* @return string 'xml'|'raw' * @return string 'xml'|'raw'
*/ */
@ -870,9 +869,9 @@ class ViewableData extends Object implements IteratorAggregate {
* Avoids having to subclass just to built templates with new css-classes, * Avoids having to subclass just to built templates with new css-classes,
* and allows for versatile css inheritance and overrides. * and allows for versatile css inheritance and overrides.
* *
* <example> * <code>
* <body class="$CSSClasses"> * <body class="$CSSClasses">
* </example> * </code>
* *
* @uses ClassInfo * @uses ClassInfo
* *

View File

@ -51,9 +51,6 @@ class ContentNegotiator {
return self::$encoding; return self::$encoding;
} }
/**
* @usedby Controller->handleRequest()
*/
static function process(HTTPResponse $response) { static function process(HTTPResponse $response) {
if(!self::enabled_for($response)) return; if(!self::enabled_for($response)) return;

View File

@ -5,6 +5,7 @@
* that controller will be used instead. It should be a subclass of ContentController. * that controller will be used instead. It should be a subclass of ContentController.
* *
* @package sapphire * @package sapphire
* @subpackage control
*/ */
class ModelAsController extends Controller implements NestedController { class ModelAsController extends Controller implements NestedController {

View File

@ -24,6 +24,9 @@
* Matching $url_handlers: "$Action/$ID" => "handleItem" (defined in TreeMultiSelectField class) * Matching $url_handlers: "$Action/$ID" => "handleItem" (defined in TreeMultiSelectField class)
* *
* {@link RequestHandler::handleRequest()} is where this behaviour is implemented. * {@link RequestHandler::handleRequest()} is where this behaviour is implemented.
*
* @package sapphire
* @subpackage control
*/ */
class RequestHandler extends ViewableData { class RequestHandler extends ViewableData {
protected $request = null; protected $request = null;

View File

@ -426,8 +426,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* } * }
* </code> * </code>
* *
* @usedby {@link DataObjectSet->toDropDownMap()}
*
* @return string * @return string
*/ */
public function getTitle() { public function getTitle() {
@ -1581,7 +1579,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* Generates a SearchContext to be used for building and processing * Generates a SearchContext to be used for building and processing
* a generic search form for properties on this object. * a generic search form for properties on this object.
* *
* @usedby {@link ModelAdmin}
* @return SearchContext * @return SearchContext
*/ */
public function getDefaultSearchContext() { public function getDefaultSearchContext() {
@ -1600,7 +1597,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* Some additional logic is included for switching field labels, based on * Some additional logic is included for switching field labels, based on
* how generic or specific the field type is. * how generic or specific the field type is.
* *
* @usedby {@link SearchContext} * Used by {@link SearchContext}.
* *
* @param array $_params * @param array $_params
* 'fieldClasses': Associative array of field names as keys and FormField classes as values * 'fieldClasses': Associative array of field names as keys and FormField classes as values
@ -1693,7 +1690,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* generate this set. To customize, overload this method in a subclass * generate this set. To customize, overload this method in a subclass
* or decorate onto it by using {@link DataObjectDecorator->updateCMSFields()}. * or decorate onto it by using {@link DataObjectDecorator->updateCMSFields()}.
* *
* <example> * <code>
* klass MyCustomClass extends DataObject { * klass MyCustomClass extends DataObject {
* static $db = array('CustomProperty'=>'Boolean'); * static $db = array('CustomProperty'=>'Boolean');
* *
@ -1703,7 +1700,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* return $fields; * return $fields;
* } * }
* } * }
* </example> * </code>
* *
* @see Good example of complex FormField building: SiteTree::getCMSFields() * @see Good example of complex FormField building: SiteTree::getCMSFields()
* *

View File

@ -462,8 +462,8 @@ class Image_Cached extends Image {
* Is connected to the URL routing "/image" through sapphire/_config.php, * Is connected to the URL routing "/image" through sapphire/_config.php,
* and used by all iframe-based upload-fields in the CMS. * and used by all iframe-based upload-fields in the CMS.
* *
* @usedby FileIFrameField * Used by {@link FileIFrameField}, {@link ImageField}.
* @usedby ImageField *
* @todo Refactor to using FileIFrameField and ImageField as a controller for the upload, * @todo Refactor to using FileIFrameField and ImageField as a controller for the upload,
* rather than something totally disconnected from the original Form and FormField * rather than something totally disconnected from the original Form and FormField
* context. Without the original context its impossible to control permissions etc. * context. Without the original context its impossible to control permissions etc.

View File

@ -489,7 +489,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a boolean type-formatted string * Return a boolean type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function boolean($values){ public function boolean($values){
@ -504,7 +504,7 @@ class MySQLDatabase extends Database {
* Return a date type-formatted string * Return a date type-formatted string
* For MySQL, we simply return the word 'date', no other parameters are necessary * For MySQL, we simply return the word 'date', no other parameters are necessary
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function date($values){ public function date($values){
@ -518,7 +518,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a decimal type-formatted string * Return a decimal type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function decimal($values){ public function decimal($values){
@ -539,7 +539,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a enum type-formatted string * Return a enum type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function enum($values){ public function enum($values){
@ -554,7 +554,7 @@ class MySQLDatabase extends Database {
* Return a float type-formatted string * Return a float type-formatted string
* For MySQL, we simply return the word 'date', no other parameters are necessary * For MySQL, we simply return the word 'date', no other parameters are necessary
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function float($values){ public function float($values){
@ -568,7 +568,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a int type-formatted string * Return a int type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function int($values){ public function int($values){
@ -583,7 +583,7 @@ class MySQLDatabase extends Database {
* Return a datetime type-formatted string * Return a datetime type-formatted string
* For MySQL, we simply return the word 'datetime', no other parameters are necessary * For MySQL, we simply return the word 'datetime', no other parameters are necessary
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function ssdatetime($values){ public function ssdatetime($values){
@ -597,7 +597,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a text type-formatted string * Return a text type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function text($values){ public function text($values){
@ -612,7 +612,7 @@ class MySQLDatabase extends Database {
* Return a time type-formatted string * Return a time type-formatted string
* For MySQL, we simply return the word 'time', no other parameters are necessary * For MySQL, we simply return the word 'time', no other parameters are necessary
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function time($values){ public function time($values){
@ -626,7 +626,7 @@ class MySQLDatabase extends Database {
/** /**
* Return a varchar type-formatted string * Return a varchar type-formatted string
* *
* @params array $values Contains a tokenised list of info about this data type * @param array $values Contains a tokenised list of info about this data type
* @return string * @return string
*/ */
public function varchar($values){ public function varchar($values){

View File

@ -10,40 +10,40 @@
* <h2>Configuration</h2> * <h2>Configuration</h2>
* *
* You can enable {Translatable} for any subclass of {@link DataObject}: * You can enable {Translatable} for any subclass of {@link DataObject}:
* <example> * <code>
* class MyClass extends DataObject { * class MyClass extends DataObject {
* static $extensions = array( * static $extensions = array(
* "Translatable" * "Translatable"
* ); * );
* } * }
* </example> * </code>
* Make sure to rebuild the database through /dev/build after enabling translatable. * Make sure to rebuild the database through /dev/build after enabling translatable.
* *
* <h2>Usage</h2> * <h2>Usage</h2>
* *
* Getting a translation for an existing instance: * Getting a translation for an existing instance:
* <example> * <code>
* $translatedObj = DataObject::get_one_by_locale('MyObject', 'de_DE'); * $translatedObj = DataObject::get_one_by_locale('MyObject', 'de_DE');
* </example> * </code>
* *
* Getting a translation for an existing instance: * Getting a translation for an existing instance:
* <example> * <code>
* $obj = DataObject::get_by_id('MyObject', 99); // original language * $obj = DataObject::get_by_id('MyObject', 99); // original language
* $translatedObj = $obj->getTranslation('de_DE'); * $translatedObj = $obj->getTranslation('de_DE');
* </example> * </code>
* *
* Getting translations through {@link Translatable::set_reading_locale()}. * Getting translations through {@link Translatable::set_reading_locale()}.
* This is *not* a recommended approach, but sometimes inavoidable (e.g. for {@link Versioned} methods). * This is *not* a recommended approach, but sometimes inavoidable (e.g. for {@link Versioned} methods).
* <example> * <code>
* $obj = DataObject::get_by_id('MyObject', 99); // original language * $obj = DataObject::get_by_id('MyObject', 99); // original language
* $translatedObj = $obj->getTranslation('de_DE'); * $translatedObj = $obj->getTranslation('de_DE');
* </example> * </code>
* *
* Creating a translation: * Creating a translation:
* <example> * <code>
* $obj = new MyObject(); * $obj = new MyObject();
* $translatedObj = $obj->createTranslation('de_DE'); * $translatedObj = $obj->createTranslation('de_DE');
* </example> * </code>
* *
* <h2>Usage for SiteTree</h2> * <h2>Usage for SiteTree</h2>
* *
@ -62,14 +62,14 @@
* Note: You can't get Children() for a parent page in a different language * Note: You can't get Children() for a parent page in a different language
* through set_reading_lang(). Get the translated parent first. * through set_reading_lang(). Get the translated parent first.
* *
* <example> * <code>
* // wrong * // wrong
* Translatable::set_reading_lang('de'); * Translatable::set_reading_lang('de');
* $englishParent->Children(); * $englishParent->Children();
* // right * // right
* $germanParent = $englishParent->getTranslation('de'); * $germanParent = $englishParent->getTranslation('de');
* $germanParent->Children(); * $germanParent->Children();
* </example> * </code>
* *
* <h2>Translation groups</h2> * <h2>Translation groups</h2>
* *

View File

@ -218,9 +218,7 @@ abstract class DBField extends ViewableData {
* Returns a FormField instance used as a default * Returns a FormField instance used as a default
* for form scaffolding. * for form scaffolding.
* *
* @usedby {@link SearchContext} * Used by {@link SearchContext}, {@link ModelAdmin}, {@link DataObject::scaffoldFormFields()}
* @usedby {@link ModelAdmin}
* @usedby {@link DataObject::scaffoldFormFields()}
* *
* @param string $title Optional. Localized title of the generated instance * @param string $title Optional. Localized title of the generated instance
* @return FormField * @return FormField
@ -235,9 +233,7 @@ abstract class DBField extends ViewableData {
* Returns a FormField instance used as a default * Returns a FormField instance used as a default
* for searchform scaffolding. * for searchform scaffolding.
* *
* @usedby {@link SearchContext} * Used by {@link SearchContext}, {@link ModelAdmin}, {@link DataObject::scaffoldFormFields()}.
* @usedby {@link ModelAdmin}
* @usedby {@link DataObject::scaffoldFormFields()}
* *
* @param string $title Optional. Localized title of the generated instance * @param string $title Optional. Localized title of the generated instance
* @return FormField * @return FormField

View File

@ -1,6 +1,8 @@
<?php <?php
/** /**
* *
* @package sapphire
* @subpackage model
*/ */
class Double extends DBField { class Double extends DBField {

View File

@ -1,12 +1,11 @@
<?php <?php
/** /**
* A special type Int field used for primary keys. * A special type Int field used for primary keys.
* *
* @todo Allow for custom limiting/filtering of scaffoldFormField dropdown * @todo Allow for custom limiting/filtering of scaffoldFormField dropdown
* *
* @param string $name * @package sapphire
* @param DataOject $object The object that this is primary key for (should have a relation with $name) * @subpackage model
*/ */
class PrimaryKey extends Int { class PrimaryKey extends Int {
/** /**
@ -16,6 +15,10 @@ class PrimaryKey extends Int {
protected static $default_search_filter_class = 'ExactMatchMultiFilter'; protected static $default_search_filter_class = 'ExactMatchMultiFilter';
/**
* @param string $name
* @param DataOject $object The object that this is primary key for (should have a relation with $name)
*/
function __construct($name, $object) { function __construct($name, $object) {
$this->object = $object; $this->object = $object;
parent::__construct($name); parent::__construct($name);

View File

@ -190,15 +190,14 @@ abstract class BulkLoader extends ViewableData {
* Useful for generation of spec documents for technical end users. * Useful for generation of spec documents for technical end users.
* *
* Return Format: * Return Format:
* <example> * <code>
* array( * array(
* 'fields' => array('myFieldName'=>'myDescription'), * 'fields' => array('myFieldName'=>'myDescription'),
* 'relations' => array('myRelationName'=>'myDescription'), * 'relations' => array('myRelationName'=>'myDescription'),
* ) * )
* </example> * </code>
* *
* @todo Mix in custom column mappings * @todo Mix in custom column mappings
* @usedby {@link ModelAdmin}
* *
* @return array * @return array
**/ **/

View File

@ -1,5 +1,4 @@
<?php <?php
/** /**
* Class to handle parsing of CSV files, where the column headers are in the first row. * Class to handle parsing of CSV files, where the column headers are in the first row.
* The idea is that you pass it another object to handle the actual procesing of the data in the CSV file. * The idea is that you pass it another object to handle the actual procesing of the data in the CSV file.
@ -19,6 +18,9 @@
* $obj->write(); * $obj->write();
* } * }
* </code> * </code>
*
* @package sapphire
* @subpackage bulkloading
*/ */
class CSVParser extends Object implements Iterator { class CSVParser extends Object implements Iterator {
protected $filename; protected $filename;

View File

@ -1,7 +1,9 @@
<?php <?php
/** /**
* Test reporter optimised for CLI (ie, plain-text) output * Test reporter optimised for CLI (ie, plain-text) output
*
* @package sapphire
* @subpackage testing
*/ */
class CliTestReporter extends SapphireTestReporter { class CliTestReporter extends SapphireTestReporter {

View File

@ -1,7 +1,9 @@
<?php <?php
/** /**
* Allows human reading of a test in a format suitable for agile documentation * Allows human reading of a test in a format suitable for agile documentation
*
* @package sapphire
* @subpackage tools
*/ */
class CodeViewer extends Controller { class CodeViewer extends Controller {
/** /**

View File

@ -5,7 +5,7 @@
* and includes them as iFrames. * and includes them as iFrames.
* *
* To create your own tests, please use this template: * To create your own tests, please use this template:
* <example> * <code>
* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> * <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
* <html> * <html>
* <head> * <head>
@ -28,7 +28,7 @@
* <div id="main"></div> * <div id="main"></div>
* </body> * </body>
* </html> * </html>
* </example> * </code>
* *
* @package sapphire * @package sapphire
* @subpackage testing * @subpackage testing

View File

@ -1,8 +1,10 @@
<?php <?php
/** /**
* Gives you a nice way of viewing your data model. * Gives you a nice way of viewing your data model.
* Access at dev/viewmodel * Access at dev/viewmodel
*
* @package sapphire
* @subpackage tools
*/ */
class ModelViewer extends Controller { class ModelViewer extends Controller {
static $url_handlers = array( static $url_handlers = array(

View File

@ -1,8 +1,10 @@
<?php <?php
/** /**
* Class to facilitate command-line output. * Class to facilitate command-line output.
* Support less-trivial output stuff such as colours (on xterm-color) * Support less-trivial output stuff such as colours (on xterm-color)
*
* @package sapphire
* @subpackage dev
*/ */
class SSCli extends Object { class SSCli extends Object {
/** /**

View File

@ -18,7 +18,10 @@ define('8192',E_DEPRECATED);
define('16384',E_USER_DEPRECATED); define('16384',E_USER_DEPRECATED);
define('30719',E_ALL); define('30719',E_ALL);
*/ */
/**
* @package sapphire
* @subpackage dev
*/
class SapphireREPL extends Controller { class SapphireREPL extends Controller {
private function error_handler( $errno, $errstr, $errfile, $errline, $errctx ) { private function error_handler( $errno, $errstr, $errfile, $errline, $errctx ) {

View File

@ -9,6 +9,9 @@
* Changelog: * Changelog:
* 0.6 First created [David Spurr] * 0.6 First created [David Spurr]
* 0.7 Added fix to getTestException provided [Glen Ogilvie] * 0.7 Added fix to getTestException provided [Glen Ogilvie]
*
* @package sapphire
* @subpackage testing
* *
* @version 0.7 2006-03-12 * @version 0.7 2006-03-12
* @author David Spurr * @author David Spurr

View File

@ -486,9 +486,7 @@ class Email extends ViewableData {
* unless overwritten. Also shown to users on live environments * unless overwritten. Also shown to users on live environments
* as a contact address on system error pages. * as a contact address on system error pages.
* *
* @usedby Email->send() * Used by {@link Email->send()}, {@link Email->sendPlain()}, {@link Debug->friendlyError()}.
* @usedby Email->sendPlain()
* @usedby Debug->friendlyError()
* *
* @param string $newEmail * @param string $newEmail
*/ */

View File

@ -1,8 +1,10 @@
<?php <?php
/** /**
* This is a form decorator that lets you place a form inside another form. * This is a form decorator that lets you place a form inside another form.
* The actions will be appropriately rewritten so that the nested form gets called, rather than the parent form. * The actions will be appropriately rewritten so that the nested form gets called, rather than the parent form.
*
* @package sapphire
* @subpackage forms
*/ */
class NestedForm extends ViewableData { class NestedForm extends ViewableData {
protected $form; protected $form;

View File

@ -1,5 +1,4 @@
<?php <?php
/************************************************************************************ /************************************************************************************
************************************************************************************ ************************************************************************************
** ** ** **
@ -9,6 +8,10 @@
************************************************************************************ ************************************************************************************
************************************************************************************/ ************************************************************************************/
/**
* @package sapphire
* @subpackage core
*/
$majorVersion = strtok(phpversion(),'.'); $majorVersion = strtok(phpversion(),'.');
if($majorVersion < 5) { if($majorVersion < 5) {
header("HTTP/1.1 500 Server Error"); header("HTTP/1.1 500 Server Error");
@ -26,7 +29,7 @@ if($majorVersion < 5) {
* - Gets an up-to-date manifest from {@link ManifestBuilder} * - Gets an up-to-date manifest from {@link ManifestBuilder}
* - Sets up error handlers with {@link Debug::loadErrorHandlers()} * - Sets up error handlers with {@link Debug::loadErrorHandlers()}
* - Calls {@link DB::connect()}, passing it the global variable $databaseConfig that should * - Calls {@link DB::connect()}, passing it the global variable $databaseConfig that should
& be defined in an _config.php * be defined in an _config.php
* - Sets up the default director rules using {@link Director::addRules()} * - Sets up the default director rules using {@link Director::addRules()}
* *
* After that, it calls {@link Director::direct()}, which is responsible for doing most of the * After that, it calls {@link Director::direct()}, which is responsible for doing most of the

View File

@ -1,10 +1,9 @@
<?php <?php
/** /**
* @package sapphire * @package sapphire
* @subpackage core * @subpackage core
*
* Alternative main.php file for servers that need the php5 extension * Alternative main.php file for servers that need the php5 extension
*/ */
include("main.php"); include("main.php");
?> ?>

View File

@ -8,7 +8,6 @@
* @package sapphire * @package sapphire
* @subpackage parsers * @subpackage parsers
* @author Ingo Schommer, Silverstripe Ltd. (<firstname>@silverstripe.com) * @author Ingo Schommer, Silverstripe Ltd. (<firstname>@silverstripe.com)
* @usedby Database->databaseError()
*/ */
class SQLFormatter extends Object { class SQLFormatter extends Object {

View File

@ -11,15 +11,9 @@
* *
* In case you need multiple contexts, consider namespacing your request parameters * In case you need multiple contexts, consider namespacing your request parameters
* by using {@link FieldSet->namespace()} on the $fields constructor parameter. * by using {@link FieldSet->namespace()} on the $fields constructor parameter.
* *
* @usedby {@link ModelAdmin} * @package sapphire
* * @subpackage search
* @param string $modelClass The base {@link DataObject} class that search properties related to.
* Also used to generate a set of result objects based on this class.
* @param FieldSet $fields Optional. FormFields mapping to {@link DataObject::$db} properties
* which are to be searched. Derived from modelclass using
* {@link DataObject::scaffoldSearchFields()} if left blank.
* @param array $filters Optional. Derived from modelclass if left blank
*/ */
class SearchContext extends Object { class SearchContext extends Object {
@ -58,8 +52,14 @@ class SearchContext extends Object {
* Usually these values come from a submitted searchform * Usually these values come from a submitted searchform
* in the form of a $_REQUEST object. * in the form of a $_REQUEST object.
* CAUTION: All values should be treated as insecure client input. * CAUTION: All values should be treated as insecure client input.
*/ *
* @param string $modelClass The base {@link DataObject} class that search properties related to.
* Also used to generate a set of result objects based on this class.
* @param FieldSet $fields Optional. FormFields mapping to {@link DataObject::$db} properties
* which are to be searched. Derived from modelclass using
* {@link DataObject::scaffoldSearchFields()} if left blank.
* @param array $filters Optional. Derived from modelclass if left blank
*/
function __construct($modelClass, $fields = null, $filters = null) { function __construct($modelClass, $fields = null, $filters = null) {
$this->modelClass = $modelClass; $this->modelClass = $modelClass;
$this->fields = ($fields) ? $fields : new FieldSet(); $this->fields = ($fields) ? $fields : new FieldSet();

View File

@ -1,14 +1,9 @@
<?php <?php
/**
* @package search
* @subpackage filters
*/
/** /**
* Matches on rows where the field is not equal to the given value. * Matches on rows where the field is not equal to the given value.
* *
* @package search * @package sapphire
* @subpackage filters * @subpackage search
*/ */
class NegationFilter extends SearchFilter { class NegationFilter extends SearchFilter {

View File

@ -184,8 +184,6 @@ abstract class SearchFilter extends Object {
* Relies on the field being populated with * Relies on the field being populated with
* {@link setValue()} * {@link setValue()}
* *
* @usedby SearchContext
*
* @return boolean * @return boolean
*/ */
public function isEmpty() { public function isEmpty() {

View File

@ -16,7 +16,8 @@ class BasicAuth extends Object {
/** /**
* Require basic authentication. Will request a username and password if none is given. * Require basic authentication. Will request a username and password if none is given.
* *
* @usedby Controller::init() * Used by {@link Controller::init()}.
*
* @param string $realm * @param string $realm
* @param string|array $permissionCode * @param string|array $permissionCode
* @return Member $member * @return Member $member

View File

@ -1,5 +1,8 @@
<?php <?php
/**
* @package sapphire
* @subpackage tasks
*/
class MigrateTranslatableTask extends BuildTask { class MigrateTranslatableTask extends BuildTask {
protected $title = "Migrate Translatable Task"; protected $title = "Migrate Translatable Task";