public function pluralClassName($class)
    {
        // get the class name if an object is given
        if (is_object($class)) {
            $class = get_class($class);
        }

        // split the class name up by namespaces
        $namespace = explode('\\', $class);
        $className = end($namespace);

        // convert the class name into the pluralized underscore version
        $inflector = Inflector::get();

        return $inflector->pluralize($inflector->underscore($className));
    }
public function pluralClassName($class)
    {
        // get the class name if an object is given
        if (is_object($class)) {
            $class = get_class($class);
        }

        // split the class name up by namespaces
        $namespace = explode('\\', $class);
        $className = end($namespace);

        // convert the class name into the pluralized underscore version
        $inflector = Inflector::get();

        return $inflector->pluralize($inflector->underscore($className));
    }
public function pluralClassName ( $ class ) { // get the class name if an object is given if ( is_object ( $ class ) ) { $ class = get_class ( $ class ) ; } // split the class name up by namespaces $ namespace = explode ( '\\' , $ class ) ; $ className = end ( $ namespace ) ; // convert the class name into the pluralized underscore version $ inflector = Inflector :: get ( ) ; return $ inflector -> pluralize ( $ inflector -> underscore ( $ className ) ) ; }
Generates the plural key from a class
i.e. LineItem -> line_items.

@param string|object $class

@return string
Generates the plural key from a class i . e . LineItem - > line_items .