src/ORM/DataObjectSchema.php
public function hasOneComponent($class, $component)
    {
        $hasOnes = Config::forClass($class)->get('has_one');
        if (!isset($hasOnes[$component])) {
            return null;
        }

        // Validate
        $relationClass = $hasOnes[$component];
        $this->checkRelationClass($class, $component, $relationClass, 'has_one');
        return $relationClass;
    }
public function hasOneComponent($class, $component)
    {
        $hasOnes = Config::forClass($class)->get('has_one');
        if (!isset($hasOnes[$component])) {
            return null;
        }

        // Validate
        $relationClass = $hasOnes[$component];
        $this->checkRelationClass($class, $component, $relationClass, 'has_one');
        return $relationClass;
    }
public function hasOneComponent ( $ class , $ component ) { $ hasOnes = Config :: forClass ( $ class ) -> get ( 'has_one' ) ; if ( ! isset ( $ hasOnes [ $ component ] ) ) { return null ; } // Validate $ relationClass = $ hasOnes [ $ component ] ; $ this -> checkRelationClass ( $ class , $ component , $ relationClass , 'has_one' ) ; return $ relationClass ; }
Return data for a specific has_one component.

@param string $class
@param string $component

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