models/Headword.php
public function setExtension($extension)
    {
        if (is_string($extension) && preg_match(Number::GUID_REGEX, $extension)) {
            return $this->extension_guid = $extension;
        }
        if ($extension instanceof Extension) {
            return $this->extension_guid = $extension->guid;
        }
        return false;
    }
public function setExtension($extension)
    {
        if (is_string($extension) && preg_match(Number::GUID_REGEX, $extension)) {
            return $this->extension_guid = $extension;
        }
        if ($extension instanceof Extension) {
            return $this->extension_guid = $extension->guid;
        }
        return false;
    }
public function setExtension ( $ extension ) { if ( is_string ( $ extension ) && preg_match ( Number :: GUID_REGEX , $ extension ) ) { return $ this -> extension_guid = $ extension ; } if ( $ extension instanceof Extension ) { return $ this -> extension_guid = $ extension -> guid ; } return false ; }
Set extension.
@param Extension|string $extension
Set extension .