protected function _primaryDataMustHaveType()
    {
        $path = $this->_getPathObject('data.type');

        if (!$this->_hasProperty($path)) {
            $this->_errorCollection->addDataError(
                $title = '_required',
                $detail = "Primary data does not contain member 'type'",
                $status = null,
                $idx = null,
                $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#crud-creating')
            );

            return false;
        }

        $value = $this->_getProperty($path->dotted);

        if (is_string($value)) {
            return true;
        }

        $this->_errorCollection->addDataTypeError(
            $title = '_notString',
            $details = "Primary data member 'type' is not a string",
            $status = null,
            $idx = null,
            $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#document-resource-object-identification')
        );

        return false;
    }
protected function _primaryDataMustHaveType()
    {
        $path = $this->_getPathObject('data.type');

        if (!$this->_hasProperty($path)) {
            $this->_errorCollection->addDataError(
                $title = '_required',
                $detail = "Primary data does not contain member 'type'",
                $status = null,
                $idx = null,
                $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#crud-creating')
            );

            return false;
        }

        $value = $this->_getProperty($path->dotted);

        if (is_string($value)) {
            return true;
        }

        $this->_errorCollection->addDataTypeError(
            $title = '_notString',
            $details = "Primary data member 'type' is not a string",
            $status = null,
            $idx = null,
            $aboutLink = $this->_getAboutLink('http://jsonapi.org/format/#document-resource-object-identification')
        );

        return false;
    }
protected function _primaryDataMustHaveType ( ) { $ path = $ this -> _getPathObject ( 'data.type' ) ; if ( ! $ this -> _hasProperty ( $ path ) ) { $ this -> _errorCollection -> addDataError ( $ title = '_required' , $ detail = "Primary data does not contain member 'type'" , $ status = null , $ idx = null , $ aboutLink = $ this -> _getAboutLink ( 'http://jsonapi.org/format/#crud-creating' ) ) ; return false ; } $ value = $ this -> _getProperty ( $ path -> dotted ) ; if ( is_string ( $ value ) ) { return true ; } $ this -> _errorCollection -> addDataTypeError ( $ title = '_notString' , $ details = "Primary data member 'type' is not a string" , $ status = null , $ idx = null , $ aboutLink = $ this -> _getAboutLink ( 'http://jsonapi.org/format/#document-resource-object-identification' ) ) ; return false ; }
Ensures primary data has member 'type' which MUST be a string.

@return bool
Ensures primary data has member type which MUST be a string .