public function buildJuggleMethod($type)
    {
        // Convert type to acceptable pattern
        $type = lcfirst(studly_case($type));

        // Map the type to it's normalized type
        switch ($type) {
            case 'bool':
            case 'boolean':
                $normalizedType = 'boolean';
                break;

            case 'int':
            case 'integer':
                $normalizedType = 'integer';
                break;

            case 'float':
            case 'double':
                $normalizedType = 'float';
                break;

            case 'datetime':
            case 'dateTime':
                $normalizedType = 'dateTime';
                break;

            case 'date':
            case 'timestamp':
            case 'string':
            case 'array':
            default:
                $normalizedType = $type;
                break;
        }

        // Construct a dynamic method name
        return 'juggle'.studly_case($normalizedType);
    }
public function buildJuggleMethod($type)
    {
        // Convert type to acceptable pattern
        $type = lcfirst(studly_case($type));

        // Map the type to it's normalized type
        switch ($type) {
            case 'bool':
            case 'boolean':
                $normalizedType = 'boolean';
                break;

            case 'int':
            case 'integer':
                $normalizedType = 'integer';
                break;

            case 'float':
            case 'double':
                $normalizedType = 'float';
                break;

            case 'datetime':
            case 'dateTime':
                $normalizedType = 'dateTime';
                break;

            case 'date':
            case 'timestamp':
            case 'string':
            case 'array':
            default:
                $normalizedType = $type;
                break;
        }

        // Construct a dynamic method name
        return 'juggle'.studly_case($normalizedType);
    }
public function buildJuggleMethod ( $ type ) { // Convert type to acceptable pattern $ type = lcfirst ( studly_case ( $ type ) ) ; // Map the type to it's normalized type switch ( $ type ) { case 'bool' : case 'boolean' : $ normalizedType = 'boolean' ; break ; case 'int' : case 'integer' : $ normalizedType = 'integer' ; break ; case 'float' : case 'double' : $ normalizedType = 'float' ; break ; case 'datetime' : case 'dateTime' : $ normalizedType = 'dateTime' ; break ; case 'date' : case 'timestamp' : case 'string' : case 'array' : default : $ normalizedType = $ type ; break ; } // Construct a dynamic method name return 'juggle' . studly_case ( $ normalizedType ) ; }
Build the method name that the type normalizes to.

@param string $type to cast

@return string
Build the method name that the type normalizes to .