lib/Accessible/AutoMethodsTrait.php
private function getMethodCallInfo($name)
    {
        $extractedMethod = preg_match("/^(set|get|is|add|remove)([A-Z].*)/", $name, $pregMatches);
        if ($extractedMethod) {
            $method = $pregMatches[1];
            $property = lcfirst($pregMatches[2]);
        } else {
            $method = 'call';
            $property = $name;
        }

        $collectionProperties = null;
        if (in_array($method, array('add', 'remove'))) {
            $collectionProperties = $this->_collectionsItemNames['byItemName'][$property];
            $property = $collectionProperties['property'];
        }

        // check that the method is accepted by the targeted property
        if (
            empty($this->_accessProperties[$property])
            || !in_array($method, $this->_accessProperties[$property])
        ) {
            throw new \BadMethodCallException("Method $name does not exist.");
        }

        return array(
            'method' => $method,
            'property' => $property,
            'collectionProperties' => $collectionProperties
        );
    }
private function getMethodCallInfo($name)
    {
        $extractedMethod = preg_match("/^(set|get|is|add|remove)([A-Z].*)/", $name, $pregMatches);
        if ($extractedMethod) {
            $method = $pregMatches[1];
            $property = lcfirst($pregMatches[2]);
        } else {
            $method = 'call';
            $property = $name;
        }

        $collectionProperties = null;
        if (in_array($method, array('add', 'remove'))) {
            $collectionProperties = $this->_collectionsItemNames['byItemName'][$property];
            $property = $collectionProperties['property'];
        }

        // check that the method is accepted by the targeted property
        if (
            empty($this->_accessProperties[$property])
            || !in_array($method, $this->_accessProperties[$property])
        ) {
            throw new \BadMethodCallException("Method $name does not exist.");
        }

        return array(
            'method' => $method,
            'property' => $property,
            'collectionProperties' => $collectionProperties
        );
    }
private function getMethodCallInfo ( $ name ) { $ extractedMethod = preg_match ( "/^(set|get|is|add|remove)([A-Z].*)/" , $ name , $ pregMatches ) ; if ( $ extractedMethod ) { $ method = $ pregMatches [ 1 ] ; $ property = lcfirst ( $ pregMatches [ 2 ] ) ; } else { $ method = 'call' ; $ property = $ name ; } $ collectionProperties = null ; if ( in_array ( $ method , array ( 'add' , 'remove' ) ) ) { $ collectionProperties = $ this -> _collectionsItemNames [ 'byItemName' ] [ $ property ] ; $ property = $ collectionProperties [ 'property' ] ; } // check that the method is accepted by the targeted property if ( empty ( $ this -> _accessProperties [ $ property ] ) || ! in_array ( $ method , $ this -> _accessProperties [ $ property ] ) ) { throw new \ BadMethodCallException ( "Method $name does not exist." ) ; } return array ( 'method' => $ method , 'property' => $ property , 'collectionProperties' => $ collectionProperties ) ; }
Extract the info about the method called.

@param string $name

@return array
Extract the info about the method called .