lib/Lime/App.php
public function bindClass($class, $alias = false) {

        $self  = $this;
        $clean = $alias ? $alias : \trim(\strtolower(\str_replace("\\", "/", $class)), "\\");

        $this->bind('/'.$clean.'/*', function() use($self, $class, $clean) {

            $parts      = \explode('/', \trim(\preg_replace("#$clean#","",$self["route"],1),'/'));
            $action     = isset($parts[0]) ? $parts[0]:"index";
            $params     = \count($parts)>1 ? \array_slice($parts, 1):[];

            return $self->invoke($class,$action, $params);
        });

        $this->bind('/'.$clean, function() use($self, $class) {
            return $self->invoke($class, 'index', []);
        });
    }
public function bindClass($class, $alias = false) {

        $self  = $this;
        $clean = $alias ? $alias : \trim(\strtolower(\str_replace("\\", "/", $class)), "\\");

        $this->bind('/'.$clean.'/*', function() use($self, $class, $clean) {

            $parts      = \explode('/', \trim(\preg_replace("#$clean#","",$self["route"],1),'/'));
            $action     = isset($parts[0]) ? $parts[0]:"index";
            $params     = \count($parts)>1 ? \array_slice($parts, 1):[];

            return $self->invoke($class,$action, $params);
        });

        $this->bind('/'.$clean, function() use($self, $class) {
            return $self->invoke($class, 'index', []);
        });
    }
public function bindClass ( $ class , $ alias = false ) { $ self = $ this ; $ clean = $ alias ? $ alias : \ trim ( \ strtolower ( \ str_replace ( "\\" , "/" , $ class ) ) , "\\" ) ; $ this -> bind ( '/' . $ clean . '/*' , function ( ) use ( $ self , $ class , $ clean ) { $ parts = \ explode ( '/' , \ trim ( \ preg_replace ( "#$clean#" , "" , $ self [ "route" ] , 1 ) , '/' ) ) ; $ action = isset ( $ parts [ 0 ] ) ? $ parts [ 0 ] : "index" ; $ params = \ count ( $ parts ) > 1 ? \ array_slice ( $ parts , 1 ) : [ ] ; return $ self -> invoke ( $ class , $ action , $ params ) ; } ) ; $ this -> bind ( '/' . $ clean , function ( ) use ( $ self , $ class ) { return $ self -> invoke ( $ class , 'index' , [ ] ) ; } ) ; }
Bind Class to routes
@param  String $class
@return void
Bind Class to routes