public function getColumn($name)
    {
        if ($name instanceof AnDomainResourceColumn) {
            return $name;
        }

        if (strpos($name, '.') !== false) {
            $parts = explode('.', $name, 2);
            $name = $parts[1];
            foreach ($this->_resources as $resource) {
                if ($resource->getAlias() == $parts[0]) {
                    break;
                }
            }
            $resources = array($resource);
        } else {
            $resources = $this->_resources;
        }

        foreach ($resources as $resource) {
            if ($resource->hasColumn($name)) {
                return $resource->getColumn($name);
            }
        }

        //throw new AnException('Column '.$name.' doesn\'t exists');
    }
public function getColumn($name)
    {
        if ($name instanceof AnDomainResourceColumn) {
            return $name;
        }

        if (strpos($name, '.') !== false) {
            $parts = explode('.', $name, 2);
            $name = $parts[1];
            foreach ($this->_resources as $resource) {
                if ($resource->getAlias() == $parts[0]) {
                    break;
                }
            }
            $resources = array($resource);
        } else {
            $resources = $this->_resources;
        }

        foreach ($resources as $resource) {
            if ($resource->hasColumn($name)) {
                return $resource->getColumn($name);
            }
        }

        //throw new AnException('Column '.$name.' doesn\'t exists');
    }
public function getColumn ( $ name ) { if ( $ name instanceof AnDomainResourceColumn ) { return $ name ; } if ( strpos ( $ name , '.' ) !== false ) { $ parts = explode ( '.' , $ name , 2 ) ; $ name = $ parts [ 1 ] ; foreach ( $ this -> _resources as $ resource ) { if ( $ resource -> getAlias ( ) == $ parts [ 0 ] ) { break ; } } $ resources = array ( $ resource ) ; } else { $ resources = $ this -> _resources ; } foreach ( $ resources as $ resource ) { if ( $ resource -> hasColumn ( $ name ) ) { return $ resource -> getColumn ( $ name ) ; } } //throw new AnException('Column '.$name.' doesn\'t exists'); }
Return a column in a resource using.

@param string $name

@return AnDomainResourceColumn
Return a column in a resource using .