LazyRecord\Inflector::variable PHP Method

variable() public method

Returns camelBacked version of an underscored string.
public variable ( string $string ) : string
$string string
return string in variable form
    public function variable($string)
    {
        $_this =& self::getInstance();
        if (!($result = $_this->_cache(__FUNCTION__, $string))) {
            $string2 = self::camelize(self::underscore($string));
            $replace = strtolower(substr($string2, 0, 1));
            $result = preg_replace('/\\w/', $replace, $string2, 1);
            $_this->_cache(__FUNCTION__, $string, $result);
        }
        return $result;
    }