src/Model/AbstractModel.php
public function replaceReservedMethod($methodName, $context = null)
    {
        if ($this->getReservedMethodsInstance()->is($methodName)) {
            if ($context !== null) {
                $methodKey = $methodName . '_' . $context;
                if (!array_key_exists($methodKey, $this->replacedReservedMethods)) {
                    $this->replacedReservedMethods[$methodKey] = 0;
                } else {
                    $this->replacedReservedMethods[$methodKey]++;
                }
                return '_' . $methodName . ($this->replacedReservedMethods[$methodKey] ? '_' . $this->replacedReservedMethods[$methodKey] : '');
            } else {
                return '_' . $methodName;
            }
        } else {
            return $methodName;
        }
    }
public function replaceReservedMethod($methodName, $context = null)
    {
        if ($this->getReservedMethodsInstance()->is($methodName)) {
            if ($context !== null) {
                $methodKey = $methodName . '_' . $context;
                if (!array_key_exists($methodKey, $this->replacedReservedMethods)) {
                    $this->replacedReservedMethods[$methodKey] = 0;
                } else {
                    $this->replacedReservedMethods[$methodKey]++;
                }
                return '_' . $methodName . ($this->replacedReservedMethods[$methodKey] ? '_' . $this->replacedReservedMethods[$methodKey] : '');
            } else {
                return '_' . $methodName;
            }
        } else {
            return $methodName;
        }
    }
public function replaceReservedMethod ( $ methodName , $ context = null ) { if ( $ this -> getReservedMethodsInstance ( ) -> is ( $ methodName ) ) { if ( $ context !== null ) { $ methodKey = $ methodName . '_' . $ context ; if ( ! array_key_exists ( $ methodKey , $ this -> replacedReservedMethods ) ) { $ this -> replacedReservedMethods [ $ methodKey ] = 0 ; } else { $ this -> replacedReservedMethods [ $ methodKey ] ++ ; } return '_' . $ methodName . ( $ this -> replacedReservedMethods [ $ methodKey ] ? '_' . $ this -> replacedReservedMethods [ $ methodKey ] : '' ) ; } else { return '_' . $ methodName ; } } else { return $ methodName ; } }
Returns a usable method for a original method
@uses PhpReservedKeywords::instance()
@uses PhpReservedKeywords::is()
@param string $methodName the method name
@param string $context the context
@return string
Returns a usable method for a original method