public function addAllowedSchema(SchemaInterface $schema)
    {
        $exists = false;
        foreach ($this->allowedSchemas as $allowedSchema) {
            if ($allowedSchema->getId() == $schema->getId()) {
                $exists = true;
            }
        }

        if (!$exists) {
            $this->allowedSchemas[] = $schema;
        }

        return $this;
    }
public function addAllowedSchema(SchemaInterface $schema)
    {
        $exists = false;
        foreach ($this->allowedSchemas as $allowedSchema) {
            if ($allowedSchema->getId() == $schema->getId()) {
                $exists = true;
            }
        }

        if (!$exists) {
            $this->allowedSchemas[] = $schema;
        }

        return $this;
    }
public function addAllowedSchema ( SchemaInterface $ schema ) { $ exists = false ; foreach ( $ this -> allowedSchemas as $ allowedSchema ) { if ( $ allowedSchema -> getId ( ) == $ schema -> getId ( ) ) { $ exists = true ; } } if ( ! $ exists ) { $ this -> allowedSchemas [ ] = $ schema ; } return $ this ; }
Add allowed schema.

@param SchemaInterface $schema

@return AttributeInterface
Add allowed schema .