protected function findAssociation($name)
    {
        if (strpos($name, '.') === false) {
            return $this->_associations->get($name);
        }

        list($name, $next) = array_pad(explode('.', $name, 2), 2, null);
        $result = $this->_associations->get($name);

        if ($result !== null && $next !== null) {
            $result = $result->getTarget()->getAssociation($next);
        }

        return $result;
    }
protected function findAssociation($name)
    {
        if (strpos($name, '.') === false) {
            return $this->_associations->get($name);
        }

        list($name, $next) = array_pad(explode('.', $name, 2), 2, null);
        $result = $this->_associations->get($name);

        if ($result !== null && $next !== null) {
            $result = $result->getTarget()->getAssociation($next);
        }

        return $result;
    }
protected function findAssociation ( $ name ) { if ( strpos ( $ name , '.' ) === false ) { return $ this -> _associations -> get ( $ name ) ; } list ( $ name , $ next ) = array_pad ( explode ( '.' , $ name , 2 ) , 2 , null ) ; $ result = $ this -> _associations -> get ( $ name ) ; if ( $ result !== null && $ next !== null ) { $ result = $ result -> getTarget ( ) -> getAssociation ( $ next ) ; } return $ result ; }
Returns an association object configured for the specified alias if any.

The name argument also supports dot syntax to access deeper associations.

```
$users = $this->getAssociation('Articles.Comments.Users');
```

@param string $name The alias used for the association.
@return \Cake\ORM\Association|null Either the association or null.
Returns an association object configured for the specified alias if any .