protected function registerPeripheralTypes(Manager $manager)
    {
        $schema = StaticSchema::inst();
        foreach ($this->types as $scaffold) {
            // Add dependent classes, e.g has_one, has_many nested queries
            foreach ($scaffold->getDependentClasses() as $class) {
                $this->type($class);
                // Implicitly, all subclasses are added (albeit with no fields)
                foreach ($schema->getDescendants($class) as $subclass) {
                    $this->type($subclass);
                }
            }

            $tree = array_merge(
                $schema->getAncestry($scaffold->getDataObjectClass()),
                $schema->getDescendants($scaffold->getDataObjectClass())
            );

            // Expose all the classes along the inheritance chain
            foreach ($tree as $class) {
                $newType = $this->type($class);
                $scaffold->cloneTo($newType);
            }
        }
    }
protected function registerPeripheralTypes(Manager $manager)
    {
        $schema = StaticSchema::inst();
        foreach ($this->types as $scaffold) {
            // Add dependent classes, e.g has_one, has_many nested queries
            foreach ($scaffold->getDependentClasses() as $class) {
                $this->type($class);
                // Implicitly, all subclasses are added (albeit with no fields)
                foreach ($schema->getDescendants($class) as $subclass) {
                    $this->type($subclass);
                }
            }

            $tree = array_merge(
                $schema->getAncestry($scaffold->getDataObjectClass()),
                $schema->getDescendants($scaffold->getDataObjectClass())
            );

            // Expose all the classes along the inheritance chain
            foreach ($tree as $class) {
                $newType = $this->type($class);
                $scaffold->cloneTo($newType);
            }
        }
    }
protected function registerPeripheralTypes ( Manager $ manager ) { $ schema = StaticSchema :: inst ( ) ; foreach ( $ this -> types as $ scaffold ) { // Add dependent classes, e.g has_one, has_many nested queries foreach ( $ scaffold -> getDependentClasses ( ) as $ class ) { $ this -> type ( $ class ) ; // Implicitly, all subclasses are added (albeit with no fields) foreach ( $ schema -> getDescendants ( $ class ) as $ subclass ) { $ this -> type ( $ subclass ) ; } } $ tree = array_merge ( $ schema -> getAncestry ( $ scaffold -> getDataObjectClass ( ) ) , $ schema -> getDescendants ( $ scaffold -> getDataObjectClass ( ) ) ) ; // Expose all the classes along the inheritance chain foreach ( $ tree as $ class ) { $ newType = $ this -> type ( $ class ) ; $ scaffold -> cloneTo ( $ newType ) ; } } }
Registers types and respective operations for all ancestors of exposed dataobjects
@param Manager $manager
Registers types and respective operations for all ancestors of exposed dataobjects