mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixed documentation to methods that use func_get_args().
This commit is contained in:
parent
e9390985ca
commit
f7f3515135
4 changed files with 9 additions and 16 deletions
|
@ -427,13 +427,11 @@ class AuthComponent extends Component {
|
|||
*
|
||||
* `$this->Auth->allow('*');`
|
||||
*
|
||||
* @param mixed $action Controller action name or array of actions
|
||||
* @param string $action Controller action name
|
||||
* @param string ... etc.
|
||||
* @param mixed $action,... Controller action name or array of actions
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/1257/allow
|
||||
*/
|
||||
public function allow() {
|
||||
public function allow($action) {
|
||||
$args = func_get_args();
|
||||
if (empty($args) || $args == array('*')) {
|
||||
$this->allowedActions = $this->_methods;
|
||||
|
@ -453,14 +451,12 @@ class AuthComponent extends Component {
|
|||
* `$this->Auth->deny(array('edit', 'add'));` or
|
||||
* `$this->Auth->deny('edit', 'add');`
|
||||
*
|
||||
* @param mixed $action Controller action name or array of actions
|
||||
* @param string $action Controller action name
|
||||
* @param string ... etc.
|
||||
* @param mixed $action,... Controller action name or array of actions
|
||||
* @return void
|
||||
* @see AuthComponent::allow()
|
||||
* @link http://book.cakephp.org/view/1258/deny
|
||||
*/
|
||||
public function deny() {
|
||||
public function deny($action) {
|
||||
$args = func_get_args();
|
||||
if (isset($args[0]) && is_array($args[0])) {
|
||||
$args = $args[0];
|
||||
|
|
|
@ -2831,11 +2831,11 @@ class Model extends Object {
|
|||
/**
|
||||
* Returns a resultset for a given SQL statement. Custom SQL queries should be performed with this method.
|
||||
*
|
||||
* @param string $sql SQL statement
|
||||
* @param string $sql,... SQL statement
|
||||
* @return array Resultset
|
||||
* @link http://book.cakephp.org/view/1027/query
|
||||
*/
|
||||
public function query() {
|
||||
public function query($sql) {
|
||||
$params = func_get_args();
|
||||
$db = $this->getDataSource();
|
||||
return call_user_func_array(array(&$db, 'query'), $params);
|
||||
|
|
|
@ -667,8 +667,7 @@ class CakeRequest implements ArrayAccess {
|
|||
* You can write to any value, even paths/keys that do not exist, and the arrays
|
||||
* will be created for you.
|
||||
*
|
||||
* @param string $name Dot separated name of the value to read/write
|
||||
* @param mixed $value Value to write to the data array.
|
||||
* @param string $name,... Dot separated name of the value to read/write
|
||||
* @return mixed Either the value being read, or this so you can chain consecutive writes.
|
||||
*/
|
||||
public function data($name) {
|
||||
|
|
|
@ -169,13 +169,11 @@ class Sanitize {
|
|||
*
|
||||
* Will remove all `<b>`, `<p>`, and `<div>` tags from the $dirty string.
|
||||
*
|
||||
* @param string $str String to sanitize
|
||||
* @param string $tag Tag to remove (add more parameters as needed)
|
||||
* @param string $str,... String to sanitize
|
||||
* @return string sanitized String
|
||||
*/
|
||||
public static function stripTags() {
|
||||
public static function stripTags($str) {
|
||||
$params = func_get_args();
|
||||
$str = $params[0];
|
||||
|
||||
for ($i = 1, $count = count($params); $i < $count; $i++) {
|
||||
$str = preg_replace('/<' . $params[$i] . '\b[^>]*>/i', '', $str);
|
||||
|
|
Loading…
Add table
Reference in a new issue