protected function _getContain()
    {
        $contain = [];
        foreach ($this->getConfig('contain') as $assocPath) {
            $finders = $this->_getFinder($assocPath);
            if ($finders === ['all']) {
                $contain[] = $assocPath;
            } else {
                $contain[$assocPath] = function ($query) use ($finders) {
                    foreach ($finders as $finder) {
                        $query->find($finder);
                    }

                    return $query;
                };
            }
        }

        return $contain;
    }
protected function _getContain()
    {
        $contain = [];
        foreach ($this->getConfig('contain') as $assocPath) {
            $finders = $this->_getFinder($assocPath);
            if ($finders === ['all']) {
                $contain[] = $assocPath;
            } else {
                $contain[$assocPath] = function ($query) use ($finders) {
                    foreach ($finders as $finder) {
                        $query->find($finder);
                    }

                    return $query;
                };
            }
        }

        return $contain;
    }
protected function _getContain ( ) { $ contain = [ ] ; foreach ( $ this -> getConfig ( 'contain' ) as $ assocPath ) { $ finders = $ this -> _getFinder ( $ assocPath ) ; if ( $ finders === [ 'all' ] ) { $ contain [ ] = $ assocPath ; } else { $ contain [ $ assocPath ] = function ( $ query ) use ( $ finders ) { foreach ( $ finders as $ finder ) { $ query -> find ( $ finder ) ; } return $ query ; } ; } } return $ contain ; }
Return the contain array modified to use custom finder as required.

@return array
Return the contain array modified to use custom finder as required .