mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch 'phpdoc-fixes' into 4
This commit is contained in:
commit
6153f441ee
@ -72,6 +72,7 @@ class CLIRequestBuilder extends HTTPRequestBuilder
|
||||
/**
|
||||
* @param array $variables
|
||||
* @param string $input
|
||||
* @param string|null $url
|
||||
* @return HTTPRequest
|
||||
*/
|
||||
public static function createFromVariables(array $variables, $input, $url = null)
|
||||
|
@ -663,7 +663,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider
|
||||
*
|
||||
* Caution: All parameters are expected to be URI-encoded already.
|
||||
*
|
||||
* @param string|array $arg,.. One or more link segments, or list of link segments as an array
|
||||
* @param string|array $arg One or more link segments, or list of link segments as an array
|
||||
* @return string
|
||||
*/
|
||||
public static function join_links($arg = null)
|
||||
|
@ -26,7 +26,7 @@ class HTTPResponse_Exception extends Exception
|
||||
* response.
|
||||
* @param int $statusCode
|
||||
* @param string $statusDescription
|
||||
* @see HTTPResponse::__construct();
|
||||
* @see HTTPResponse::__construct()
|
||||
*/
|
||||
public function __construct($body = null, $statusCode = null, $statusDescription = null)
|
||||
{
|
||||
|
@ -54,6 +54,7 @@ class GetParameter implements Rule, Bypass
|
||||
* Generates the confirmation item
|
||||
*
|
||||
* @param string $token
|
||||
* @param string $value
|
||||
*
|
||||
* @return Confirmation\Item
|
||||
*/
|
||||
@ -70,7 +71,7 @@ class GetParameter implements Rule, Bypass
|
||||
* Generates the unique token depending on the path and the parameter
|
||||
*
|
||||
* @param string $path URL path
|
||||
* @param string $param The parameter value
|
||||
* @param string $value The parameter value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ class HttpMethodBypass implements Bypass
|
||||
/**
|
||||
* Initialize the bypass with HTTP methods
|
||||
*
|
||||
* @param string[] ...$method
|
||||
* @param string[] ...$methods
|
||||
*/
|
||||
public function __construct(...$methods)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ class Url implements Rule, Bypass
|
||||
* against parameter values accordingly. Null
|
||||
* as a value in the array matches any parameter values.
|
||||
*
|
||||
* @param string|null $httpMethods
|
||||
* @param string|null $params
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -186,6 +186,7 @@ class Url implements Rule, Bypass
|
||||
/**
|
||||
* Generates the unique token depending on the path
|
||||
*
|
||||
* @param string $httpMethod HTTP method
|
||||
* @param string $path URL path
|
||||
*
|
||||
* @return string
|
||||
|
@ -244,7 +244,7 @@ class RSSFeed extends ViewableData
|
||||
* Set the name of the template to use. Actual template will be resolved
|
||||
* via the standard template inclusion process.
|
||||
*
|
||||
* @param string
|
||||
* @param string $template
|
||||
*/
|
||||
public function setTemplate($template)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ class IPUtils
|
||||
* Compares two IPv6 addresses.
|
||||
* In case a subnet is given, it checks if it contains the request IP.
|
||||
*
|
||||
* @author David Soria Parra <dsp at php dot net>
|
||||
* @author David Soria Parra <dsp@php.net>
|
||||
*
|
||||
* @see https://github.com/dsp/v6tools
|
||||
*
|
||||
|
@ -109,7 +109,7 @@ class Config_ForClass
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* @param string $class
|
||||
*
|
||||
* @return Config_ForClass
|
||||
*/
|
||||
|
@ -336,7 +336,7 @@ class Convert
|
||||
* Convert a XML string to a PHP array recursively. Do not
|
||||
* call this function directly, Please use {@link Convert::xml2array()}
|
||||
*
|
||||
* @param SimpleXMLElement
|
||||
* @param SimpleXMLElement $xml
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@ -491,7 +491,7 @@ class Convert
|
||||
* Convert a string (normally a title) to a string suitable for using in
|
||||
* urls and other html attributes. Uses {@link URLSegmentFilter}.
|
||||
*
|
||||
* @param string
|
||||
* @param string $title
|
||||
* @return string
|
||||
*/
|
||||
public static function raw2url($title)
|
||||
|
@ -1103,7 +1103,7 @@ class Injector implements ContainerInterface
|
||||
* Additional parameters are passed through as
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $argument,... arguments to pass to the constructor
|
||||
* @param mixed ...$argument arguments to pass to the constructor
|
||||
* @return mixed A new instance of the specified object
|
||||
*/
|
||||
public function create($name, $argument = null)
|
||||
|
@ -17,7 +17,7 @@ class ClassManifestErrorHandler implements ErrorHandler
|
||||
protected $pathname;
|
||||
|
||||
/**
|
||||
* @param String $pathname
|
||||
* @param string $pathname
|
||||
*/
|
||||
public function __construct($pathname)
|
||||
{
|
||||
|
@ -44,7 +44,6 @@ class RequestFlushDiscoverer implements FlushDiscoverer
|
||||
/**
|
||||
* Checks whether the request contains any flush indicators
|
||||
*
|
||||
* @param HTTPRequest $request active request
|
||||
*
|
||||
* @return null|bool flush or don't care
|
||||
*/
|
||||
|
@ -55,7 +55,7 @@ abstract class BuildTask
|
||||
* execute via the TaskRunner
|
||||
*
|
||||
* @param HTTPRequest $request
|
||||
* @return
|
||||
* @return void
|
||||
*/
|
||||
abstract public function run($request);
|
||||
|
||||
|
@ -68,7 +68,7 @@ class CSSContentParser
|
||||
* Currently the selector engine only supports querying by tag, id, and class.
|
||||
* See {@link getByXpath()} for a more direct selector syntax.
|
||||
*
|
||||
* @param String $selector
|
||||
* @param string $selector
|
||||
* @return SimpleXMLElement[]
|
||||
*/
|
||||
public function getBySelector($selector)
|
||||
@ -80,7 +80,7 @@ class CSSContentParser
|
||||
/**
|
||||
* Allows querying the content through XPATH selectors.
|
||||
*
|
||||
* @param String $xpath SimpleXML compatible XPATH statement
|
||||
* @param string $xpath SimpleXML compatible XPATH statement
|
||||
* @return SimpleXMLElement[]
|
||||
*/
|
||||
public function getByXpath($xpath)
|
||||
@ -92,7 +92,7 @@ class CSSContentParser
|
||||
* Converts a CSS selector into an equivalent xpath expression.
|
||||
* Currently the selector engine only supports querying by tag, id, and class.
|
||||
*
|
||||
* @param String $selector See {@link getBySelector()}
|
||||
* @param string $selector See {@link getBySelector()}
|
||||
* @return String XPath expression
|
||||
*/
|
||||
public function selector2xpath($selector)
|
||||
|
@ -134,7 +134,7 @@ class CSVParser implements Iterator
|
||||
* ));
|
||||
* </code>
|
||||
*
|
||||
* @param array
|
||||
* @param array $columnMap
|
||||
*/
|
||||
public function mapColumns($columnMap)
|
||||
{
|
||||
@ -156,7 +156,7 @@ class CSVParser implements Iterator
|
||||
* If you call this function, then the first row of the CSV will be
|
||||
* included in the data returned.
|
||||
*
|
||||
* @param array
|
||||
* @param array $headerRow
|
||||
*/
|
||||
public function provideHeaderRow($headerRow)
|
||||
{
|
||||
@ -210,7 +210,7 @@ class CSVParser implements Iterator
|
||||
/**
|
||||
* Map the contents of a header array using $this->mappedColumns.
|
||||
*
|
||||
* @param array
|
||||
* @param array $header
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -48,8 +48,8 @@ class FixtureBlueprint
|
||||
];
|
||||
|
||||
/**
|
||||
* @param String $name
|
||||
* @param String $class Defaults to $name
|
||||
* @param string $name
|
||||
* @param string $class Defaults to $name
|
||||
* @param array $defaults
|
||||
*/
|
||||
public function __construct($name, $class = null, $defaults = [])
|
||||
|
@ -239,7 +239,7 @@ class FixtureFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $name
|
||||
* @param string $name
|
||||
* @return FixtureBlueprint|false
|
||||
*/
|
||||
public function getBlueprint($name)
|
||||
|
@ -35,7 +35,7 @@ class i18nTextCollectorTask extends BuildTask
|
||||
* It will search for existent modules that use the i18n feature, parse the _t() calls
|
||||
* and write the resultant files in the lang folder of each module.
|
||||
*
|
||||
* @uses DataObject->collectI18nStatics()
|
||||
* @uses DataObject::collectI18nStatics()
|
||||
*
|
||||
* @param HTTPRequest $request
|
||||
*/
|
||||
|
@ -324,7 +324,7 @@ class CompositeField extends FormField
|
||||
/**
|
||||
* Add a new child field to the end of the set.
|
||||
*
|
||||
* @param FormField
|
||||
* @param FormField $field
|
||||
*/
|
||||
public function push(FormField $field)
|
||||
{
|
||||
@ -334,7 +334,7 @@ class CompositeField extends FormField
|
||||
/**
|
||||
* Add a new child field to the beginning of the set.
|
||||
*
|
||||
* @param FormField
|
||||
* @param FormField $field
|
||||
*/
|
||||
public function unshift(FormField $field)
|
||||
{
|
||||
@ -342,10 +342,11 @@ class CompositeField extends FormField
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses FieldList->insertBefore()
|
||||
* @uses FieldList::insertBefore()
|
||||
*
|
||||
* @param string $insertBefore
|
||||
* @param FormField $field
|
||||
* @param bool $appendIfMissing
|
||||
* @return false|FormField
|
||||
*/
|
||||
public function insertBefore($insertBefore, $field, $appendIfMissing = true)
|
||||
@ -354,9 +355,10 @@ class CompositeField extends FormField
|
||||
}
|
||||
|
||||
/**
|
||||
* @uses FieldList->insertAfter()
|
||||
* @uses FieldList::insertAfter()
|
||||
* @param string $insertAfter
|
||||
* @param FormField $field
|
||||
* @param bool $appendIfMissing
|
||||
* @return false|FormField
|
||||
*/
|
||||
public function insertAfter($insertAfter, $field, $appendIfMissing = true)
|
||||
@ -470,7 +472,7 @@ class CompositeField extends FormField
|
||||
* Find the numerical position of a field within
|
||||
* the children collection. Doesn't work recursively.
|
||||
*
|
||||
* @param string|FormField
|
||||
* @param string|FormField $field
|
||||
* @return int Position in children collection (first position starts with 0). Returns FALSE if the field can't
|
||||
* be found.
|
||||
*/
|
||||
@ -496,9 +498,9 @@ class CompositeField extends FormField
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform the named field into a readonly feld.
|
||||
* Transform the named field into a readonly field.
|
||||
*
|
||||
* @param string|FormField
|
||||
* @param string|FormField $field
|
||||
* @return bool
|
||||
*/
|
||||
public function makeFieldReadonly($field)
|
||||
|
@ -288,7 +288,7 @@ class DatetimeField extends TextField
|
||||
/**
|
||||
* Get a date formatter for the ISO 8601 format
|
||||
*
|
||||
* @param String $timezone Optional timezone identifier (defaults to server timezone)
|
||||
* @param string $timezone Optional timezone identifier (defaults to server timezone)
|
||||
* @return IntlDateFormatter
|
||||
*/
|
||||
protected function getInternalFormatter($timezone = null)
|
||||
|
@ -881,7 +881,7 @@ class FieldList extends ArrayList
|
||||
* Find the numerical position of a field within
|
||||
* the children collection. Doesn't work recursively.
|
||||
*
|
||||
* @param string|FormField
|
||||
* @param string|FormField $field
|
||||
* @return int Position in children collection (first position starts with 0).
|
||||
* Returns FALSE if the field can't be found.
|
||||
*/
|
||||
|
@ -170,9 +170,9 @@ class Form extends ViewableData implements HasRequestHandler
|
||||
/**
|
||||
* The SS template to render this form HTML into.
|
||||
* Default is "Form", but this can be changed to
|
||||
* another template for customisation.
|
||||
* another template for customization.
|
||||
*
|
||||
* @see Form->setTemplate()
|
||||
* @see Form::setTemplate()
|
||||
* @var string|array|null
|
||||
*/
|
||||
protected $template;
|
||||
@ -326,7 +326,7 @@ class Form extends ViewableData implements HasRequestHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool
|
||||
* @param bool $flag
|
||||
*/
|
||||
public function setNotifyUnsavedChanges($flag)
|
||||
{
|
||||
@ -664,7 +664,7 @@ class Form extends ViewableData implements HasRequestHandler
|
||||
/**
|
||||
* Set actions that are exempt from validation
|
||||
*
|
||||
* @param array
|
||||
* @param array $actions
|
||||
* @return $this
|
||||
*/
|
||||
public function setValidationExemptActions($actions)
|
||||
@ -916,7 +916,7 @@ class Form extends ViewableData implements HasRequestHandler
|
||||
* Set the target of this form to any value - useful for opening the form contents in a new window or refreshing
|
||||
* another frame
|
||||
*
|
||||
* @param string|FormTemplateHelper
|
||||
* @param string|FormTemplateHelper $helper
|
||||
*/
|
||||
public function setTemplateHelper($helper)
|
||||
{
|
||||
@ -1371,9 +1371,9 @@ class Form extends ViewableData implements HasRequestHandler
|
||||
* Escaping happens automatically on saving the data through
|
||||
* {@link saveInto()}.
|
||||
*
|
||||
* @uses FieldList->dataFields()
|
||||
* @uses FormField->setSubmittedValue()
|
||||
* @uses FormField->setValue()
|
||||
* @uses FieldList::dataFields()
|
||||
* @uses FormField::setSubmittedValue()
|
||||
* @uses FormField::setValue()
|
||||
*
|
||||
* @param array|DataObject $data
|
||||
* @param int $mergeStrategy
|
||||
|
@ -75,7 +75,7 @@ class FormAction extends FormField
|
||||
*
|
||||
* @param string $action The method to call when the button is clicked
|
||||
* @param string $title The label on the button. This should be plain text, not escaped as HTML.
|
||||
* @param Form form The parent form, auto-set when the field is placed inside a form
|
||||
* @param Form $form The parent form, auto-set when the field is placed inside a form
|
||||
*/
|
||||
public function __construct($action, $title = "", $form = null)
|
||||
{
|
||||
@ -225,7 +225,7 @@ class FormAction extends FormField
|
||||
/**
|
||||
* Enable or disable the rendering of this action as a <button />
|
||||
*
|
||||
* @param boolean
|
||||
* @param boolean $bool
|
||||
* @return $this
|
||||
*/
|
||||
public function setUseButtonTag($bool)
|
||||
|
@ -521,7 +521,7 @@ class FormField extends RequestHandler
|
||||
/**
|
||||
* Sets the right title for this formfield
|
||||
*
|
||||
* @param string|DBField Plain text string, or a DBField with appropriately escaped HTML
|
||||
* @param string|DBField $rightTitle Plain text string, or a DBField with appropriately escaped HTML
|
||||
* @return $this
|
||||
*/
|
||||
public function setRightTitle($rightTitle)
|
||||
@ -1012,7 +1012,7 @@ class FormField extends RequestHandler
|
||||
|
||||
$result = $context->renderWith($this->getTemplates());
|
||||
|
||||
// Trim whitespace from the result, so that trailing newlines are supressed. Works for strings and HTMLText values
|
||||
// Trim whitespace from the result, so that trailing newlines are suppressed. Works for strings and HTMLText values
|
||||
if (is_string($result)) {
|
||||
$result = trim($result);
|
||||
} elseif ($result instanceof DBField) {
|
||||
@ -1294,7 +1294,7 @@ class FormField extends RequestHandler
|
||||
*
|
||||
* It's handy for assigning HTML classes. Doesn't signify the input type attribute.
|
||||
*
|
||||
* @see {link getAttributes()}.
|
||||
* @see {@link getAttributes()}.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -68,7 +68,7 @@ class GridFieldConfig
|
||||
}
|
||||
|
||||
/**
|
||||
* @param GridFieldComponent|GridFieldComponent[] $component,... One or more components, or an array of components
|
||||
* @param GridFieldComponent|GridFieldComponent[] ...$component One or more components, or an array of components
|
||||
* @return $this
|
||||
*/
|
||||
public function addComponents($component = null)
|
||||
|
@ -34,7 +34,7 @@ class GridFieldDataColumns implements GridField_ColumnProvider
|
||||
* See {@link GridFieldDataColumns->getDisplayFields()} and {@link GridFieldDataColumns}.
|
||||
*
|
||||
* @param GridField $gridField
|
||||
* @param array - List reference of all column names.
|
||||
* @param array $columns List reference of all column names. (by reference)
|
||||
*/
|
||||
public function augmentColumns($gridField, &$columns)
|
||||
{
|
||||
|
@ -165,6 +165,8 @@ class GridFieldFilterHeader implements GridField_URLHandler, GridField_HTMLProvi
|
||||
* If the GridField has a filterable datalist, return an array of actions
|
||||
*
|
||||
* @param GridField $gridField
|
||||
* @param string $actionName
|
||||
* @param array $data
|
||||
* @return void
|
||||
*/
|
||||
public function handleAction(GridField $gridField, $actionName, $arguments, $data)
|
||||
|
@ -53,7 +53,7 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
/**
|
||||
* Place the print button in a <p> tag below the field
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -78,7 +78,7 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
/**
|
||||
* Print is an action button.
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -106,7 +106,7 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
/**
|
||||
* Print is accessible via the url
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
* @return array
|
||||
*/
|
||||
public function getURLHandlers($gridField)
|
||||
@ -145,7 +145,7 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
/**
|
||||
* Return the columns to print
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -167,7 +167,7 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
/**
|
||||
* Return the title of the printed page
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ interface GridField_ActionProvider extends GridFieldComponent
|
||||
* There is no namespacing on these actions, so you need to ensure that
|
||||
* they don't conflict with other components.
|
||||
*
|
||||
* @param GridField
|
||||
* @param GridField $gridField
|
||||
* @return array with action identifier strings.
|
||||
*/
|
||||
public function getActions($gridField);
|
||||
|
@ -33,12 +33,12 @@ class HTMLEditorSanitiser
|
||||
*/
|
||||
private static $link_rel_value = 'noopener noreferrer';
|
||||
|
||||
/** @var [stdClass] - $element => $rule hash for whitelist element rules where the element name isn't a pattern */
|
||||
/** @var stdClass - $element => $rule hash for whitelist element rules where the element name isn't a pattern */
|
||||
protected $elements = [];
|
||||
/** @var [stdClass] - Sequential list of whitelist element rules where the element name is a pattern */
|
||||
/** @var stdClass - Sequential list of whitelist element rules where the element name is a pattern */
|
||||
protected $elementPatterns = [];
|
||||
|
||||
/** @var [stdClass] - The list of attributes that apply to all further whitelisted elements added */
|
||||
/** @var stdClass - The list of attributes that apply to all further whitelisted elements added */
|
||||
protected $globalAttributes = [];
|
||||
|
||||
/**
|
||||
|
@ -403,12 +403,12 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
*
|
||||
* If passing in an associative array, the key of each item should be the plugin name.
|
||||
* The value of each item is one of:
|
||||
* - null - Will be treated as a stardard plugin in the standard location
|
||||
* - null - Will be treated as a standard plugin in the standard location
|
||||
* - relative path - Will be treated as a relative url
|
||||
* - absolute url - Some url to an external plugin
|
||||
* - An instance of ModuleResource object containing the plugin
|
||||
*
|
||||
* @param string|array $plugin,... a string, or several strings, or a single array of strings - The plugins to enable
|
||||
* @param string|array ...$plugin a string, or several strings, or a single array of strings - The plugins to enable
|
||||
* @return $this
|
||||
*/
|
||||
public function enablePlugins($plugin)
|
||||
@ -432,7 +432,7 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
|
||||
/**
|
||||
* Enable one or several plugins. Will properly handle being passed a plugin that is already disabled
|
||||
* @param string|array $plugin,... a string, or several strings, or a single array of strings - The plugins to enable
|
||||
* @param string|array ...$plugin a string, or several strings, or a single array of strings - The plugins to enable
|
||||
* @return $this
|
||||
*/
|
||||
public function disablePlugins($plugin)
|
||||
@ -492,7 +492,7 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
* Totally re-set the buttons on a given line
|
||||
*
|
||||
* @param int $line The line number to redefine, from 1 to 3
|
||||
* @param string $buttons,... A string or several strings, or a single array of strings.
|
||||
* @param string ...$buttons A string or several strings, or a single array of strings.
|
||||
* The button names to assign to this line.
|
||||
* @return $this
|
||||
*/
|
||||
@ -509,7 +509,7 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
/**
|
||||
* Add buttons to the end of a line
|
||||
* @param int $line The line number to redefine, from 1 to 3
|
||||
* @param string $buttons,... A string or several strings, or a single array of strings.
|
||||
* @param string ...$buttons A string or several strings, or a single array of strings.
|
||||
* The button names to add to this line
|
||||
* @return $this
|
||||
*/
|
||||
@ -554,11 +554,11 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert buttons before the first occurance of another button
|
||||
* Insert buttons before the first occurrence of another button
|
||||
* @param string $before the name of the button to insert other buttons before
|
||||
* @param string $buttons,... a string, or several strings, or a single array of strings.
|
||||
* @param string ...$buttons a string, or several strings, or a single array of strings.
|
||||
* The button names to insert before that button
|
||||
* @return bool True if insertion occured, false if it did not (because the given button name was not found)
|
||||
* @return bool True if insertion occurred, false if it did not (because the given button name was not found)
|
||||
*/
|
||||
public function insertButtonsBefore($before, $buttons)
|
||||
{
|
||||
@ -573,11 +573,11 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert buttons after the first occurance of another button
|
||||
* Insert buttons after the first occurrence of another button
|
||||
* @param string $after the name of the button to insert other buttons before
|
||||
* @param string $buttons,... a string, or several strings, or a single array of strings.
|
||||
* @param string ...$buttons a string, or several strings, or a single array of strings.
|
||||
* The button names to insert after that button
|
||||
* @return bool True if insertion occured, false if it did not (because the given button name was not found)
|
||||
* @return bool True if insertion occurred, false if it did not (because the given button name was not found)
|
||||
*/
|
||||
public function insertButtonsAfter($after, $buttons)
|
||||
{
|
||||
@ -592,8 +592,8 @@ class TinyMCEConfig extends HTMLEditorConfig implements i18nEntityProvider
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the first occurance of buttons
|
||||
* @param string $buttons,... one or more strings - the name of the buttons to remove
|
||||
* Remove the first occurrence of buttons
|
||||
* @param string ...$buttons one or more strings - the name of the buttons to remove
|
||||
*/
|
||||
public function removeButtons($buttons)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ abstract class SelectField extends FormField
|
||||
*
|
||||
* @see FormField::castedCopy()
|
||||
*
|
||||
* @param String $classOrCopy
|
||||
* @param string $classOrCopy
|
||||
* @return FormField
|
||||
*/
|
||||
public function castedCopy($classOrCopy)
|
||||
|
@ -16,9 +16,9 @@ class SelectionGroup_Item extends CompositeField
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* @param String $value Form field identifier
|
||||
* @param string $value Form field identifier
|
||||
* @param FormField|array $fields Contents of the option
|
||||
* @param String $title Title to show for the radio button option
|
||||
* @param string $title Title to show for the radio button option
|
||||
*/
|
||||
function __construct($value, $fields = null, $title = null)
|
||||
{
|
||||
|
@ -218,6 +218,7 @@ class TabSet extends CompositeField
|
||||
*
|
||||
* @param string $insertBefore Name of the field to insert before
|
||||
* @param FormField $field The form field to insert
|
||||
* @param bool $appendIfMissing
|
||||
* @return FormField|null
|
||||
*/
|
||||
public function insertBefore($insertBefore, $field, $appendIfMissing = true)
|
||||
@ -233,6 +234,7 @@ class TabSet extends CompositeField
|
||||
*
|
||||
* @param string $insertAfter Name of the field to insert after
|
||||
* @param FormField $field The form field to insert
|
||||
* @param bool $appendIfMissing
|
||||
* @return FormField|null
|
||||
*/
|
||||
public function insertAfter($insertAfter, $field, $appendIfMissing = true)
|
||||
|
@ -97,7 +97,7 @@ trait UploadReceiver
|
||||
* for each of these categories
|
||||
*
|
||||
* @param string $category Category name
|
||||
* @param string,... $categories Additional category names
|
||||
* @param string ...$categories Additional category names
|
||||
* @return $this
|
||||
*/
|
||||
public function setAllowedFileCategories($category)
|
||||
|
@ -249,7 +249,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L
|
||||
*
|
||||
* @param array|object $item
|
||||
* @param array|object $with
|
||||
* @return void;
|
||||
* @return void
|
||||
*/
|
||||
public function replace($item, $with)
|
||||
{
|
||||
|
@ -52,12 +52,14 @@ abstract class DBSchemaManager
|
||||
protected $supressOutput = false;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
protected static $table_name_warnings = [];
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* @param string $table
|
||||
* @param string $class
|
||||
*
|
||||
* @deprecated 4.0.0:5.0.0
|
||||
*/
|
||||
public static function showTableNameWarning($table, $class)
|
||||
@ -958,7 +960,7 @@ MESSAGE
|
||||
* Return the list of indexes in a table.
|
||||
*
|
||||
* @param string $table The table name.
|
||||
* @return array[array] List of current indexes in the table, each in standard
|
||||
* @return array[] List of current indexes in the table, each in standard
|
||||
* array form. The key for this array should be predictable using the indexKey
|
||||
* method
|
||||
*/
|
||||
|
@ -484,8 +484,8 @@ abstract class Database
|
||||
/**
|
||||
* Generate a WHERE clause for text matching.
|
||||
*
|
||||
* @param String $field Quoted field name
|
||||
* @param String $value Escaped search. Can include percentage wildcards.
|
||||
* @param string $field Quoted field name
|
||||
* @param string $value Escaped search. Can include percentage wildcards.
|
||||
* Ignored if $parameterised is true.
|
||||
* @param boolean $exact Exact matches or wildcard support.
|
||||
* @param boolean $negate Negate the clause.
|
||||
@ -526,7 +526,7 @@ abstract class Database
|
||||
* function to return an SQL datetime expression that can be used with the adapter in use
|
||||
* used for querying a datetime addition
|
||||
*
|
||||
* @param string $date, can be either 'now', literal datetime like '1973-10-14 10:30:00' or field name,
|
||||
* @param string $date can be either 'now', literal datetime like '1973-10-14 10:30:00' or field name,
|
||||
* e.g. '"SiteTree"."Created"'
|
||||
* @param string $interval to be added, use the format [sign][integer] [qualifier], e.g. -1 Day, +15 minutes,
|
||||
* +1 YEAR
|
||||
@ -547,7 +547,7 @@ abstract class Database
|
||||
* function to return an SQL datetime expression that can be used with the adapter in use
|
||||
* used for querying a datetime substraction
|
||||
*
|
||||
* @param string $date1, can be either 'now', literal datetime like '1973-10-14 10:30:00' or field name
|
||||
* @param string $date1 can be either 'now', literal datetime like '1973-10-14 10:30:00' or field name
|
||||
* e.g. '"SiteTree"."Created"'
|
||||
* @param string $date2 to be substracted of $date1, can be either 'now', literal datetime
|
||||
* like '1973-10-14 10:30:00' or field name, e.g. '"SiteTree"."Created"'
|
||||
|
@ -55,7 +55,7 @@ class MySQLiConnector extends DBConnector
|
||||
* Retrieve a prepared statement for a given SQL string
|
||||
*
|
||||
* @param string $sql
|
||||
* @param boolean &$success
|
||||
* @param boolean $success (by reference)
|
||||
* @return mysqli_stmt
|
||||
*/
|
||||
public function prepareStatement($sql, &$success)
|
||||
@ -190,7 +190,7 @@ class MySQLiConnector extends DBConnector
|
||||
* Prepares the list of parameters in preparation for passing to mysqli_stmt_bind_param
|
||||
*
|
||||
* @param array $parameters List of parameters
|
||||
* @param array &$blobs Out parameter for list of blobs to bind separately
|
||||
* @param array $blobs Out parameter for list of blobs to bind separately (by reference)
|
||||
* @return array List of parameters appropriate for mysqli_stmt_bind_param function
|
||||
*/
|
||||
public function parsePreparedParameters($parameters, &$blobs)
|
||||
|
@ -530,7 +530,7 @@ class DB
|
||||
/**
|
||||
* Create a new table.
|
||||
* @param string $table The name of the table
|
||||
* @param array$fields A map of field names to field types
|
||||
* @param array $fields A map of field names to field types
|
||||
* @param array $indexes A map of indexes
|
||||
* @param array $options An map of additional options. The available keys are as follows:
|
||||
* - 'MSSQLDatabase'/'MySQLDatabase'/'PostgreSQLDatabase' - database-specific options such as "engine"
|
||||
|
@ -135,7 +135,6 @@ abstract class DataExtension extends Extension
|
||||
* See {@link DataObject::can()} and {@link DataObject::extendedCan()} for context.
|
||||
*
|
||||
* @param Member $member
|
||||
* @param array $context
|
||||
* @return bool|null
|
||||
*/
|
||||
public function can($member)
|
||||
@ -150,7 +149,6 @@ abstract class DataExtension extends Extension
|
||||
* See {@link DataObject::canEdit()} and {@link DataObject::extendedCan()} for context.
|
||||
*
|
||||
* @param Member $member
|
||||
* @param array $context
|
||||
* @return bool|null
|
||||
*/
|
||||
public function canEdit($member)
|
||||
@ -165,7 +163,6 @@ abstract class DataExtension extends Extension
|
||||
* See {@link DataObject::canDelete()} and {@link DataObject::extendedCan()} for context.
|
||||
*
|
||||
* @param Member $member
|
||||
* @param array $context
|
||||
* @return bool|null
|
||||
*/
|
||||
public function canDelete($member)
|
||||
@ -180,7 +177,6 @@ abstract class DataExtension extends Extension
|
||||
* See {@link DataObject::canCreate()} and {@link DataObject::extendedCan()} for context.
|
||||
*
|
||||
* @param Member $member
|
||||
* @param array $context
|
||||
* @return bool|null
|
||||
*/
|
||||
public function canCreate($member)
|
||||
|
@ -309,7 +309,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
|
||||
* @example $list = $list->sort('Name', 'ASC');
|
||||
* @example $list = $list->sort(array('Name'=>'ASC', 'Age'=>'DESC'));
|
||||
*
|
||||
* @param String|array Escaped SQL statement. If passed as array, all keys and values are assumed to be escaped.
|
||||
* @param string|array Escaped SQL statement. If passed as array, all keys and values are assumed to be escaped.
|
||||
* @return static
|
||||
*/
|
||||
public function sort()
|
||||
@ -512,7 +512,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
|
||||
*
|
||||
*
|
||||
* @param string $field Name of field or relation to apply
|
||||
* @param string &$columnName Quoted column name
|
||||
* @param string $columnName Quoted column name (by reference)
|
||||
* @param bool $linearOnly Set to true to restrict to linear relations only. Set this
|
||||
* if this relation will be used for sorting, and should not include duplicate rows.
|
||||
* @return $this DataList with this relation applied
|
||||
|
@ -1237,7 +1237,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
*
|
||||
* This called after {@link $this->validate()}, so you can be sure that your data is valid.
|
||||
*
|
||||
* @uses DataExtension->onBeforeWrite()
|
||||
* @uses DataExtension::onBeforeWrite()
|
||||
*/
|
||||
protected function onBeforeWrite()
|
||||
{
|
||||
@ -1253,7 +1253,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* $this->changed will have a record
|
||||
* database. Don't forget to call parent::onAfterWrite(), though!
|
||||
*
|
||||
* @uses DataExtension->onAfterWrite()
|
||||
* @uses DataExtension::onAfterWrite()
|
||||
*/
|
||||
protected function onAfterWrite()
|
||||
{
|
||||
@ -1283,7 +1283,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* You can overload this to clean up or otherwise process data before delete this
|
||||
* record. Don't forget to call parent::onBeforeDelete(), though!
|
||||
*
|
||||
* @uses DataExtension->onBeforeDelete()
|
||||
* @uses DataExtension::onBeforeDelete()
|
||||
*/
|
||||
protected function onBeforeDelete()
|
||||
{
|
||||
@ -1309,7 +1309,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* Will traverse the defaults of the current class and all its parent classes.
|
||||
* Called by the constructor when creating new records.
|
||||
*
|
||||
* @uses DataExtension->populateDefaults()
|
||||
* @uses DataExtension::populateDefaults()
|
||||
* @return DataObject $this
|
||||
*/
|
||||
public function populateDefaults()
|
||||
@ -1560,7 +1560,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* - $this->onBeforeWrite() gets called beforehand.
|
||||
* - Extensions such as Versioned will ammend the database-write to ensure that a version is saved.
|
||||
*
|
||||
* @uses DataExtension->augmentWrite()
|
||||
* @uses DataExtension::augmentWrite()
|
||||
*
|
||||
* @param boolean $showDebug Show debugging information
|
||||
* @param boolean $forceInsert Run INSERT command rather than UPDATE, even if record already exists
|
||||
@ -1733,7 +1733,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* Delete this data object.
|
||||
* $this->onBeforeDelete() gets called.
|
||||
* Note that in Versioned objects, both Stage and Live will be deleted.
|
||||
* @uses DataExtension->augmentSQL()
|
||||
* @uses DataExtension::augmentSQL()
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
@ -3490,7 +3490,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
|
||||
/**
|
||||
* @see $sourceQueryParams
|
||||
* @param array
|
||||
* @param array $array
|
||||
*/
|
||||
public function setSourceQueryParams($array)
|
||||
{
|
||||
@ -3525,7 +3525,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
/**
|
||||
* Check the database schema and update it as necessary.
|
||||
*
|
||||
* @uses DataExtension->augmentDatabase()
|
||||
* @uses DataExtension::augmentDatabase()
|
||||
*/
|
||||
public function requireTable()
|
||||
{
|
||||
@ -3607,7 +3607,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* this to add default records when the database is built, but make sure you
|
||||
* call parent::requireDefaultRecords().
|
||||
*
|
||||
* @uses DataExtension->requireDefaultRecords()
|
||||
* @uses DataExtension::requireDefaultRecords()
|
||||
*/
|
||||
public function requireDefaultRecords()
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ class DBEnum extends DBString
|
||||
* Returns the values of this enum as an array, suitable for insertion into
|
||||
* a {@link DropdownField}
|
||||
*
|
||||
* @param boolean
|
||||
* @param bool $hasEmpty
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -27,8 +27,8 @@ interface DBIndexable
|
||||
/**
|
||||
* Set the desired index type to use
|
||||
*
|
||||
* @param string|bool $indexType Either of the types listed in {@link SilverStripe\ORM\FieldType\DBIndexable}, or
|
||||
* boolean true to indicate that the default index type should be used.
|
||||
* @param string|bool $type Either of the types listed in {@link SilverStripe\ORM\FieldType\DBIndexable}, or
|
||||
* boolean true to indicate that the default index type should be used.
|
||||
* @return $this
|
||||
* @throws \InvalidArgumentException If $type is not one of TYPE_INDEX, TYPE_UNIQUE or TYPE_FULLTEXT
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ class DBMoney extends DBComposite
|
||||
protected $locale = null;
|
||||
|
||||
/**
|
||||
* @param array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
private static $composite_db = [
|
||||
'Currency' => 'Varchar(3)',
|
||||
|
@ -82,7 +82,7 @@ abstract class DBString extends DBField
|
||||
|
||||
/**
|
||||
* (non-PHPdoc)
|
||||
* @see core/model/fieldtypes/DBField#exists()
|
||||
* @see DBField::exists()
|
||||
*/
|
||||
public function exists()
|
||||
{
|
||||
|
@ -8,7 +8,9 @@ namespace SilverStripe\ORM;
|
||||
* All methods in this interface are immutable - they should return new instances with the filter
|
||||
* applied, rather than applying the filter in place
|
||||
*
|
||||
* @see SS_List, Sortable, Limitable
|
||||
* @see SS_List
|
||||
* @see Sortable
|
||||
* @see Limitable
|
||||
*/
|
||||
interface Filterable extends SS_List
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ abstract class SearchFilter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
@ -243,7 +243,7 @@ abstract class SearchFilter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String
|
||||
* @param string $name
|
||||
*/
|
||||
public function setFullName($name)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ class HasManyList extends RelationList
|
||||
/**
|
||||
* Create a new HasManyList object.
|
||||
* Generation of the appropriate record set is left up to the caller, using the normal
|
||||
* {@link DataList} methods. Addition arguments are used to support {@@link add()}
|
||||
* {@link DataList} methods. Addition arguments are used to support {@link add()}
|
||||
* and {@link remove()} methods.
|
||||
*
|
||||
* @param string $dataClass The class of the DataObjects that this will list.
|
||||
|
@ -344,8 +344,7 @@ class Hierarchy extends DataExtension
|
||||
* a list of record IDs, for more efficient database querying. If $idList
|
||||
* is null, then every record will be pre-cached.
|
||||
*
|
||||
* @param string $class
|
||||
* @param string $stage
|
||||
* @param string $baseClass
|
||||
* @param array $idList
|
||||
*/
|
||||
public static function prepopulate_numchildren_cache($baseClass, $idList = null)
|
||||
|
@ -8,7 +8,9 @@ namespace SilverStripe\ORM;
|
||||
* All methods in this interface are immutable - they should return new instances with the limit
|
||||
* applied, rather than applying the limit in place
|
||||
*
|
||||
* @see SS_List, Sortable, Filterable
|
||||
* @see SS_List
|
||||
* @see Sortable
|
||||
* @see Filterable
|
||||
*/
|
||||
interface Limitable extends SS_List
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ class ManyManyList extends RelationList
|
||||
*
|
||||
* Generation of the appropriate record set is left up to the caller, using
|
||||
* the normal {@link DataList} methods. Addition arguments are used to
|
||||
* support {@@link add()} and {@link remove()} methods.
|
||||
* support {@link add()} and {@link remove()} methods.
|
||||
*
|
||||
* @param string $dataClass The class of the DataObjects that this will list.
|
||||
* @param string $joinTable The name of the table whose entries define the content of this many_many relation.
|
||||
|
@ -29,7 +29,7 @@ class PaginatedList extends ListDecorator
|
||||
*
|
||||
* @param SS_List $list The list to paginate. The getRange method will
|
||||
* be used to get the subset of objects to show.
|
||||
* @param array|ArrayAccess Either a map of request parameters or
|
||||
* @param array|ArrayAccess $request Either a map of request parameters or
|
||||
* request object that the pagination offset is read from.
|
||||
* @throws Exception
|
||||
*/
|
||||
@ -72,7 +72,7 @@ class PaginatedList extends ListDecorator
|
||||
/**
|
||||
* Returns the number of items displayed per page. This defaults to 10.
|
||||
*
|
||||
* @return int.
|
||||
* @return int
|
||||
*/
|
||||
public function getPageLength()
|
||||
{
|
||||
@ -511,7 +511,7 @@ class PaginatedList extends ListDecorator
|
||||
/**
|
||||
* Set the request object for this list
|
||||
*
|
||||
* @param HTTPRequest|ArrayAccess
|
||||
* @param HTTPRequest|ArrayAccess $request
|
||||
*/
|
||||
public function setRequest($request)
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
* @param int $order A numerical index to control the order that joins are added to the query; lower order values
|
||||
* will cause the query to appear first. The default is 20, and joins created automatically by the
|
||||
* ORM have a value of 10.
|
||||
* @param array $parameters Any additional parameters if the join is a parameterised subquery
|
||||
* @param array $parameters Any additional parameters if the join is a parameterized subquery
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function addLeftJoin($table, $onPredicate, $tableAlias = '', $order = 20, $parameters = [])
|
||||
@ -161,7 +161,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
* @param int $order A numerical index to control the order that joins are added to the query; lower order
|
||||
* values will cause the query to appear first. The default is 20, and joins created automatically by the
|
||||
* ORM have a value of 10.
|
||||
* @param array $parameters Any additional parameters if the join is a parameterised subquery
|
||||
* @param array $parameters Any additional parameters if the join is a parameterized subquery
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function addInnerJoin($table, $onPredicate, $tableAlias = null, $order = 20, $parameters = [])
|
||||
@ -256,7 +256,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the finalised list of joins
|
||||
* Retrieves the finalized list of joins
|
||||
*
|
||||
* @todo This part of the code could be simplified
|
||||
*
|
||||
@ -374,7 +374,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
*
|
||||
* @see http://stackoverflow.com/q/4353739/139301
|
||||
*
|
||||
* @param array &$array The array to sort
|
||||
* @param array $array The array to sort (by reference)
|
||||
* @param callable|string $cmpFunction The function to use for comparison
|
||||
*/
|
||||
protected function mergesort(&$array, $cmpFunction = 'strcmp')
|
||||
@ -426,8 +426,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
*
|
||||
* @see SQLConditionalExpression::addWhere() for syntax examples
|
||||
*
|
||||
* @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries
|
||||
* @param mixed $where,... Unlimited additional predicates
|
||||
* @param mixed ...$where Predicate(s) to set, as escaped SQL statements or parameterized queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function setWhere($where)
|
||||
@ -440,7 +439,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
/**
|
||||
* Adds a WHERE clause.
|
||||
*
|
||||
* Note that the database will execute any parameterised queries using
|
||||
* Note that the database will execute any parameterized queries using
|
||||
* prepared statements whenever available.
|
||||
*
|
||||
* There are several different ways of doing this.
|
||||
@ -513,8 +512,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
* ));
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries
|
||||
* @param mixed $where,... Unlimited additional predicates
|
||||
* @param mixed ...$where Predicate(s) to set, as escaped SQL statements or parameterized queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function addWhere($where)
|
||||
@ -530,8 +528,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
/**
|
||||
* @see SQLConditionalExpression::addWhere()
|
||||
*
|
||||
* @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries
|
||||
* @param mixed $filters,... Unlimited additional predicates
|
||||
* @param mixed ...$filters Predicate(s) to set, as escaped SQL statements or parameterized queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function setWhereAny($filters)
|
||||
@ -545,8 +542,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
/**
|
||||
* @see SQLConditionalExpression::addWhere()
|
||||
*
|
||||
* @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries
|
||||
* @param mixed $filters,... Unlimited additional predicates
|
||||
* @param mixed ...$filters Predicate(s) to set, as escaped SQL statements or parameterized queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function addWhereAny($filters)
|
||||
@ -583,19 +579,19 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
|
||||
/**
|
||||
* Given a key / value pair, extract the predicate and any potential paramaters
|
||||
* in a format suitable for storing internally as a list of paramaterised conditions.
|
||||
* in a format suitable for storing internally as a list of parameterized conditions.
|
||||
*
|
||||
* @param string|integer $key The left hand (key index) of this condition.
|
||||
* Could be the predicate or an integer index.
|
||||
* @param mixed $value The The right hand (array value) of this condition.
|
||||
* Could be the predicate (if non-paramaterised), or the parameter(s). Could also be
|
||||
* Could be the predicate (if non-parameterized), or the parameter(s). Could also be
|
||||
* an array containing a nested condition in the similar format this function outputs.
|
||||
* @return array|SQLConditionGroup A single item array in the format
|
||||
* array($predicate => array($parameters)), unless it's a SQLConditionGroup
|
||||
*/
|
||||
protected function parsePredicate($key, $value)
|
||||
{
|
||||
// If a string key is given then presume this is a paramaterised condition
|
||||
// If a string key is given then presume this is a parameterized condition
|
||||
if ($value instanceof SQLConditionGroup) {
|
||||
return $value;
|
||||
} elseif (is_string($key)) {
|
||||
@ -631,14 +627,14 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
return $this->parsePredicate($key, $pairValue);
|
||||
}
|
||||
} else {
|
||||
// Non-paramaterised condition
|
||||
// Non-parameterized condition
|
||||
return [$value => []];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a list of conditions in any user-acceptable format, convert this
|
||||
* to an array of paramaterised predicates suitable for merging with $this->where.
|
||||
* to an array of parameterized predicates suitable for merging with $this->where.
|
||||
*
|
||||
* Normalised predicates are in the below format, in order to avoid key collisions.
|
||||
*
|
||||
@ -691,7 +687,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
*/
|
||||
public function splitQueryParameters($conditions, &$predicates, &$parameters)
|
||||
{
|
||||
// Merge all filters with paramaterised queries
|
||||
// Merge all filters with parameterized queries
|
||||
$predicates = [];
|
||||
$parameters = [];
|
||||
foreach ($conditions as $condition) {
|
||||
@ -742,7 +738,7 @@ abstract class SQLConditionalExpression extends SQLExpression
|
||||
{
|
||||
$regexp = '/^(.*\.)?("|`)?[a-zA-Z]+ID("|`)?\s?(=|IN)/';
|
||||
|
||||
// @todo - Test this works with paramaterised queries
|
||||
// @todo - Test this works with parameterized queries
|
||||
foreach ($this->getWhereParameterised($parameters) as $predicate) {
|
||||
if (preg_match($regexp, $predicate)) {
|
||||
return true;
|
||||
|
@ -14,7 +14,7 @@ class SQLInsert extends SQLExpression implements SQLWriteExpression
|
||||
/**
|
||||
* List of rows to be inserted
|
||||
*
|
||||
* @var array[SQLAssignmentRow]
|
||||
* @var SQLAssignmentRow[]
|
||||
*/
|
||||
protected $rows = [];
|
||||
|
||||
|
@ -489,8 +489,7 @@ class SQLSelect extends SQLConditionalExpression
|
||||
*
|
||||
* @see SQLSelect::addWhere() for syntax examples
|
||||
*
|
||||
* @param mixed $having Predicate(s) to set, as escaped SQL statements or parameterised queries
|
||||
* @param mixed $having,... Unlimited additional predicates
|
||||
* @param mixed ...$having Predicate(s) to set, as escaped SQL statements or parameterised queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function setHaving($having)
|
||||
@ -505,8 +504,7 @@ class SQLSelect extends SQLConditionalExpression
|
||||
*
|
||||
* @see SQLSelect::addWhere() for syntax examples
|
||||
*
|
||||
* @param mixed $having Predicate(s) to set, as escaped SQL statements or parameterised queries
|
||||
* @param mixed $having,... Unlimited additional predicates
|
||||
* @param mixed ...$having Predicate(s) to set, as escaped SQL statements or parameterised queries
|
||||
* @return $this Self reference
|
||||
*/
|
||||
public function addHaving($having)
|
||||
|
@ -8,7 +8,9 @@ namespace SilverStripe\ORM;
|
||||
* All methods in this interface are immutable - they should return new instances with the sort
|
||||
* applied, rather than applying the sort in place
|
||||
*
|
||||
* @see SS_List, Filterable, Limitable
|
||||
* @see SS_List
|
||||
* @see Filterable
|
||||
* @see Limitable
|
||||
*/
|
||||
interface Sortable extends SS_List
|
||||
{
|
||||
|
@ -176,7 +176,6 @@ class UnsavedRelationList extends ArrayList implements Relation
|
||||
* Remove the items from this list with the given IDs
|
||||
*
|
||||
* @param array $items
|
||||
* @param array $items
|
||||
* @return $this
|
||||
*/
|
||||
public function removeMany($items)
|
||||
|
@ -359,7 +359,7 @@ class Storage
|
||||
*
|
||||
* @param string $url Success URL
|
||||
*
|
||||
* @return $this;
|
||||
* @return $this
|
||||
*/
|
||||
public function setSuccessUrl($url)
|
||||
{
|
||||
@ -382,7 +382,7 @@ class Storage
|
||||
*
|
||||
* @param string $url Failure URL
|
||||
*
|
||||
* @return $this;
|
||||
* @return $this
|
||||
*/
|
||||
public function setFailureUrl($url)
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ class Group extends DataObject
|
||||
/**
|
||||
* Overloaded to ensure the code is always descent.
|
||||
*
|
||||
* @param string
|
||||
* @param string $val
|
||||
*/
|
||||
public function setCode($val)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ class InheritedPermissionFlusher extends DataExtension implements Flushable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param MemberCacheFlusher[]
|
||||
* @param MemberCacheFlusher[] $services
|
||||
* @throws InvalidArgumentException
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -1103,7 +1103,7 @@ class Member extends DataObject
|
||||
|
||||
/**
|
||||
* @param array $columns Column names on the Member record to show in {@link getTitle()}.
|
||||
* @param String $sep Separator
|
||||
* @param string $sep Separator
|
||||
*/
|
||||
public static function set_title_columns($columns, $sep = ' ')
|
||||
{
|
||||
|
@ -13,8 +13,8 @@ class NullSecurityToken extends SecurityToken
|
||||
{
|
||||
|
||||
/**
|
||||
* @param String
|
||||
* @return boolean
|
||||
* @param string $compare
|
||||
* @return bool
|
||||
*/
|
||||
public function check($compare)
|
||||
{
|
||||
@ -43,8 +43,8 @@ class NullSecurityToken extends SecurityToken
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $url
|
||||
* @return String
|
||||
* @param string $url
|
||||
* @return string
|
||||
*/
|
||||
public function addToUrl($url)
|
||||
{
|
||||
@ -52,7 +52,7 @@ class NullSecurityToken extends SecurityToken
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
@ -60,7 +60,7 @@ class NullSecurityToken extends SecurityToken
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $val
|
||||
* @param string $val
|
||||
*/
|
||||
public function setValue($val)
|
||||
{
|
||||
@ -68,7 +68,7 @@ class NullSecurityToken extends SecurityToken
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
* @return string
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ abstract class PasswordEncryptor
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $algorithm
|
||||
* @param string $algorithm
|
||||
* @return PasswordEncryptor
|
||||
* @throws PasswordEncryptor_NotFoundException
|
||||
*/
|
||||
@ -65,8 +65,8 @@ abstract class PasswordEncryptor
|
||||
* Return a string value stored in the {@link Member->Password} property.
|
||||
* The password should be hashed with {@link salt()} if applicable.
|
||||
*
|
||||
* @param String $password Cleartext password to be hashed
|
||||
* @param String $salt (Optional)
|
||||
* @param string $password Cleartext password to be hashed
|
||||
* @param string $salt (Optional)
|
||||
* @param Member $member (Optional)
|
||||
* @return String Maximum of 512 characters.
|
||||
*/
|
||||
|
@ -238,7 +238,6 @@ class PasswordExpirationMiddleware implements HTTPMiddleware
|
||||
* Allow the current request to be finished without password expiration check
|
||||
*
|
||||
* @param Session $session Session where we persist the redirect URL
|
||||
* @param string $url change password form address
|
||||
*/
|
||||
public static function allowCurrentRequest(Session $session)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ class PasswordValidator
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $password
|
||||
* @param string $password
|
||||
* @param Member $member
|
||||
* @return ValidationResult
|
||||
*/
|
||||
|
@ -160,7 +160,7 @@ class Permission extends DataObject implements TemplateGlobalProvider, Resettabl
|
||||
/**
|
||||
* Check that the given member has the given permission.
|
||||
*
|
||||
* @param int|Member memberID The ID of the member to check. Leave blank for the current member.
|
||||
* @param int|Member $member The ID of the member to check. Leave blank for the current member.
|
||||
* Alternatively you can use a member object.
|
||||
* @param string|array $code Code of the permission to check (case-sensitive)
|
||||
* @param string $arg Optional argument (e.g. a permissions for a specific page)
|
||||
|
@ -39,10 +39,10 @@ class PermissionCheckboxSetField extends FormField
|
||||
protected $source = null;
|
||||
|
||||
/**
|
||||
* @param String $name
|
||||
* @param String $title
|
||||
* @param String $managedClass
|
||||
* @param String $filterField
|
||||
* @param string $name
|
||||
* @param string $title
|
||||
* @param string $managedClass
|
||||
* @param string $filterField
|
||||
* @param Group|SS_List $records One or more {@link Group} or {@link PermissionRole} records
|
||||
* used to determine permission checkboxes.
|
||||
* Caution: saveInto() can only be used with a single record, all inherited permissions will be marked readonly.
|
||||
|
@ -611,7 +611,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
||||
/**
|
||||
* Get the HTML Content for the $Content area during login
|
||||
*
|
||||
* @param string &$messageType Type of message, if available, passed back to caller
|
||||
* @param string $messageType Type of message, if available, passed back to caller (by reference)
|
||||
* @return string Message in HTML format
|
||||
*/
|
||||
protected function getSessionMessage(&$messageType = null)
|
||||
|
@ -39,7 +39,7 @@ class ArrayData extends ViewableData
|
||||
} elseif (count($value) === 0) {
|
||||
$this->array = [];
|
||||
} else {
|
||||
$message = 'ArrayData constructor expects an object or associative array,
|
||||
$message = 'ArrayData constructor expects an object or associative array,
|
||||
enumerated array passed instead. Did you mean to use ArrayList?';
|
||||
throw new InvalidArgumentException($message);
|
||||
}
|
||||
@ -112,7 +112,7 @@ class ArrayData extends ViewableData
|
||||
/**
|
||||
* Converts an associative array to a simple object
|
||||
*
|
||||
* @param array
|
||||
* @param array $arr
|
||||
* @return stdClass $obj
|
||||
*/
|
||||
public static function array_to_object($arr = null)
|
||||
|
@ -37,7 +37,7 @@ class EmbedResource implements Embeddable
|
||||
protected $dispatcher;
|
||||
|
||||
/**
|
||||
* @param string @url
|
||||
* @param string $url
|
||||
*/
|
||||
public function __construct($url)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ abstract class HTMLCleaner
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array
|
||||
* @param array $config
|
||||
*/
|
||||
public function setConfig($config)
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ class URLSegmentFilter implements FilterInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean
|
||||
* @param bool $bool
|
||||
*/
|
||||
public function setAllowMultibyte($bool)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ class Requirements implements Flushable
|
||||
* filemtime. This has the benefit of allowing the browser to cache the URL infinitely,
|
||||
* while automatically busting this cache every time the file is changed.
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $var
|
||||
*/
|
||||
public static function set_suffix_requirements($var)
|
||||
{
|
||||
@ -449,7 +449,7 @@ class Requirements implements Flushable
|
||||
* Set whether you want to write the JS to the body of the page rather than at the end of the
|
||||
* head tag.
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $var
|
||||
*/
|
||||
public static function set_write_js_to_body($var)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ class Requirements_Backend
|
||||
* filemtime. This has the benefit of allowing the browser to cache the URL infinitely,
|
||||
* while automatically busting this cache every time the file is changed.
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $var
|
||||
*/
|
||||
public function setSuffixRequirements($var)
|
||||
{
|
||||
@ -327,7 +327,7 @@ class Requirements_Backend
|
||||
* Set whether you want to write the JS to the body of the page rather than at the end of the
|
||||
* head tag.
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setWriteJavascriptToBody($var)
|
||||
@ -350,7 +350,7 @@ class Requirements_Backend
|
||||
/**
|
||||
* Forces the JavaScript requirements to the end of the body, right before the closing tag
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setForceJSToBottom($var)
|
||||
|
@ -1294,6 +1294,7 @@ EOC;
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @param string $templateName
|
||||
* @return string $code
|
||||
*/
|
||||
protected function includeDebuggingComments($code, $templateName)
|
||||
|
@ -5071,6 +5071,7 @@ EOC;
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @param string $templateName
|
||||
* @return string $code
|
||||
*/
|
||||
protected function includeDebuggingComments($code, $templateName)
|
||||
|
@ -561,7 +561,7 @@ class SSViewer implements Flushable
|
||||
/**
|
||||
* Flag whether to include the requirements in this response.
|
||||
*
|
||||
* @param bool
|
||||
* @param bool $incl
|
||||
*/
|
||||
public function includeRequirements($incl = true)
|
||||
{
|
||||
|
@ -335,7 +335,7 @@ class SSViewer_Scope
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array
|
||||
* @param array $stack
|
||||
*/
|
||||
protected function setItemStack(array $stack)
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ class i18nTextCollector
|
||||
* i18n feature, parse the _t() calls and write the resultant files
|
||||
* in the lang folder of each module.
|
||||
*
|
||||
* @uses DataObject->collectI18nStatics()
|
||||
* @uses DataObject::collectI18nStatics()
|
||||
*
|
||||
* @param array $restrictToModules
|
||||
* @param bool $mergeWithExisting Merge new master strings with existing
|
||||
|
@ -148,7 +148,7 @@ class i18n implements TemplateGlobalProvider
|
||||
* @param string $entity Entity that identifies the string. It must be in the form
|
||||
* "Namespace.Entity" where Namespace will be usually the class name where this
|
||||
* string is used and Entity identifies the string inside the namespace.
|
||||
* @param mixed $arg,... Additional arguments are parsed as such:
|
||||
* @param mixed $arg Additional arguments are parsed as such:
|
||||
* - Next string argument is a default. Pass in a `|` pipe-delimited value with `{count}`
|
||||
* to do pluralisation.
|
||||
* - Any other string argument after default is context for i18nTextCollector
|
||||
|
@ -18,7 +18,7 @@ use SilverStripe\i18n\TextCollection\i18nTextCollector;
|
||||
* Classes must be able to be constructed without mandatory arguments, otherwise
|
||||
* this interface will have no effect.
|
||||
*
|
||||
* @uses i18nTextCollector->collectFromEntityProviders()
|
||||
* @uses i18nTextCollector::collectFromEntityProviders()
|
||||
*/
|
||||
interface i18nEntityProvider
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ function project()
|
||||
* @param string $entity Entity that identifies the string. It must be in the form
|
||||
* "Namespace.Entity" where Namespace will be usually the class name where this
|
||||
* string is used and Entity identifies the string inside the namespace.
|
||||
* @param mixed $arg,... Additional arguments are parsed as such:
|
||||
* @param mixed $arg Additional arguments are parsed as such:
|
||||
* - Next string argument is a default. Pass in a `|` pipe-delimeted value with `{count}`
|
||||
* to do pluralisation.
|
||||
* - Any other string argument after default is context for i18nTextCollector
|
||||
|
@ -382,9 +382,9 @@ EOT;
|
||||
|
||||
|
||||
/**
|
||||
* @param String $html [description]
|
||||
* @param string $html [description]
|
||||
* @param array $nodes Breadcrumb path as array
|
||||
* @param String $message
|
||||
* @param string $message
|
||||
*/
|
||||
protected function assertTreeContains($html, $nodes, $message = null)
|
||||
{
|
||||
@ -398,9 +398,9 @@ EOT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $html [description]
|
||||
* @param string $html [description]
|
||||
* @param array $nodes Breadcrumb path as array
|
||||
* @param String $message
|
||||
* @param string $message
|
||||
*/
|
||||
protected function assertTreeNotContains($html, $nodes, $message = null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user