src/ORM/DataObjectSchema.php
public function hasManyComponent($class, $component, $classOnly = true)
    {
        $hasMany = (array)Config::inst()->get($class, 'has_many');
        if (!isset($hasMany[$component])) {
            return null;
        }

        // Remove has_one specifier if given
        $hasMany = $hasMany[$component];
        $hasManyClass = strtok($hasMany, '.');

        // Validate
        $this->checkRelationClass($class, $component, $hasManyClass, 'has_many');
        return $classOnly ? $hasManyClass : $hasMany;
    }
public function hasManyComponent($class, $component, $classOnly = true)
    {
        $hasMany = (array)Config::inst()->get($class, 'has_many');
        if (!isset($hasMany[$component])) {
            return null;
        }

        // Remove has_one specifier if given
        $hasMany = $hasMany[$component];
        $hasManyClass = strtok($hasMany, '.');

        // Validate
        $this->checkRelationClass($class, $component, $hasManyClass, 'has_many');
        return $classOnly ? $hasManyClass : $hasMany;
    }
public function hasManyComponent ( $ class , $ component , $ classOnly = true ) { $ hasMany = ( array ) Config :: inst ( ) -> get ( $ class , 'has_many' ) ; if ( ! isset ( $ hasMany [ $ component ] ) ) { return null ; } // Remove has_one specifier if given $ hasMany = $ hasMany [ $ component ] ; $ hasManyClass = strtok ( $ hasMany , '.' ) ; // Validate $ this -> checkRelationClass ( $ class , $ component , $ hasManyClass , 'has_many' ) ; return $ classOnly ? $ hasManyClass : $ hasMany ; }
Return data for a specific has_many component.

@param string $class Parent class
@param string $component
@param bool $classOnly If this is TRUE, than any has_many relationships in the form
"ClassName.Field" will have the field data stripped off. It defaults to TRUE.

@return string|null
Return data for a specific has_many component .