public function type($class)
    {
        // Remove leading backslash. All namespaces are assumed absolute in YAML
        $class = ltrim($class, '\\');

        foreach ($this->types as $scaffold) {
            if ($scaffold->getDataObjectClass() === $class) {
                return $scaffold;
            }
        }

        $scaffold = Injector::inst()->create(DataObjectScaffolder::class, $class)
                ->setChainableParent($this);
        $this->types[] = $scaffold;

        return $scaffold;
    }
public function type($class)
    {
        // Remove leading backslash. All namespaces are assumed absolute in YAML
        $class = ltrim($class, '\\');

        foreach ($this->types as $scaffold) {
            if ($scaffold->getDataObjectClass() === $class) {
                return $scaffold;
            }
        }

        $scaffold = Injector::inst()->create(DataObjectScaffolder::class, $class)
                ->setChainableParent($this);
        $this->types[] = $scaffold;

        return $scaffold;
    }
public function type ( $ class ) { // Remove leading backslash. All namespaces are assumed absolute in YAML $ class = ltrim ( $ class , '\\' ) ; foreach ( $ this -> types as $ scaffold ) { if ( $ scaffold -> getDataObjectClass ( ) === $ class ) { return $ scaffold ; } } $ scaffold = Injector :: inst ( ) -> create ( DataObjectScaffolder :: class , $ class ) -> setChainableParent ( $ this ) ; $ this -> types [ ] = $ scaffold ; return $ scaffold ; }
Finds or makes a DataObject definition.

@param  string $class
@return DataObjectScaffolder
@throws InvalidArgumentException
Finds or makes a DataObject definition .