src/Charcoal/Property/ModelStructureProperty.php
public function addStructureInterface($interface)
    {
        if (!is_string($interface)) {
            throw new InvalidArgumentException(sprintf(
                'Structure interface must to be a string, received %s',
                is_object($interface) ? get_class($interface) : gettype($interface)
            ));
        }

        if (!empty($interface)) {
            $interface = $this->parseStructureInterface($interface);

            $this->structureInterfaces[$interface] = true;
            $this->isStructureFinalized = false;
        }

        return $this;
    }
public function addStructureInterface($interface)
    {
        if (!is_string($interface)) {
            throw new InvalidArgumentException(sprintf(
                'Structure interface must to be a string, received %s',
                is_object($interface) ? get_class($interface) : gettype($interface)
            ));
        }

        if (!empty($interface)) {
            $interface = $this->parseStructureInterface($interface);

            $this->structureInterfaces[$interface] = true;
            $this->isStructureFinalized = false;
        }

        return $this;
    }
public function addStructureInterface ( $ interface ) { if ( ! is_string ( $ interface ) ) { throw new InvalidArgumentException ( sprintf ( 'Structure interface must to be a string, received %s' , is_object ( $ interface ) ? get_class ( $ interface ) : gettype ( $ interface ) ) ) ; } if ( ! empty ( $ interface ) ) { $ interface = $ this -> parseStructureInterface ( $ interface ) ; $ this -> structureInterfaces [ $ interface ] = true ; $ this -> isStructureFinalized = false ; } return $ this ; }
Add the given metadata interfaces for the property to use as a structure.

@param  string $interface A metadata interface to use.
@throws InvalidArgumentException If the interface is not a string.
@return self
Add the given metadata interfaces for the property to use as a structure .