src/ORM/DataObject.php
public function getRelationType($component)
    {
        $types = array('has_one', 'has_many', 'many_many', 'belongs_many_many', 'belongs_to');
        $config = $this->config();
        foreach ($types as $type) {
            $relations = $config->get($type);
            if ($relations && isset($relations[$component])) {
                return $type;
            }
        }
        return null;
    }
public function getRelationType($component)
    {
        $types = array('has_one', 'has_many', 'many_many', 'belongs_many_many', 'belongs_to');
        $config = $this->config();
        foreach ($types as $type) {
            $relations = $config->get($type);
            if ($relations && isset($relations[$component])) {
                return $type;
            }
        }
        return null;
    }
public function getRelationType ( $ component ) { $ types = array ( 'has_one' , 'has_many' , 'many_many' , 'belongs_many_many' , 'belongs_to' ) ; $ config = $ this -> config ( ) ; foreach ( $ types as $ type ) { $ relations = $ config -> get ( $ type ) ; if ( $ relations && isset ( $ relations [ $ component ] ) ) { return $ type ; } } return null ; }
Given a relation name, determine the relation type

@param string $component Name of component
@return string has_one, has_many, many_many, belongs_many_many or belongs_to
Given a relation name determine the relation type