src/Synapse/Stdlib/DataObject.php
protected function getMagicMethodProperty($method)
    {
        // Get the property name
        $property = lcfirst(substr($method, 3));

        $transform = function ($letters) {
            $letter = array_shift($letters);

            return '_' . strtolower($letter);
        };

        $property = preg_replace_callback('/([A-Z])/', $transform, $property);

        // Make sure the property exists
        if (! array_key_exists($property, $this->object)) {
            throw new InvalidArgumentException('Property, '.$property.', not found');
        }

        return $property;
    }
protected function getMagicMethodProperty($method)
    {
        // Get the property name
        $property = lcfirst(substr($method, 3));

        $transform = function ($letters) {
            $letter = array_shift($letters);

            return '_' . strtolower($letter);
        };

        $property = preg_replace_callback('/([A-Z])/', $transform, $property);

        // Make sure the property exists
        if (! array_key_exists($property, $this->object)) {
            throw new InvalidArgumentException('Property, '.$property.', not found');
        }

        return $property;
    }
protected function getMagicMethodProperty ( $ method ) { // Get the property name $ property = lcfirst ( substr ( $ method , 3 ) ) ; $ transform = function ( $ letters ) { $ letter = array_shift ( $ letters ) ; return '_' . strtolower ( $ letter ) ; } ; $ property = preg_replace_callback ( '/([A-Z])/' , $ transform , $ property ) ; // Make sure the property exists if ( ! array_key_exists ( $ property , $ this -> object ) ) { throw new InvalidArgumentException ( 'Property, ' . $ property . ', not found' ) ; } return $ property ; }
Determine the property that is being set or get

@param  string $method Method being called
@return string
Determine the property that is being set or get