protected function assertField($field)
    {
        if (empty($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" can not be empty', $this->entity, $field));
        }

        if (is_numeric($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" can not be numeric', $this->entity, $field));
        }

        if (!is_string($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" must be string, %s given', $this->entity, $field, $this->getType($field)));
        }
    }
protected function assertField($field)
    {
        if (empty($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" can not be empty', $this->entity, $field));
        }

        if (is_numeric($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" can not be numeric', $this->entity, $field));
        }

        if (!is_string($field)) {
            throw new DefinitionException(sprintf('Invalid field name for relation "%s.%s" must be string, %s given', $this->entity, $field, $this->getType($field)));
        }
    }
protected function assertField ( $ field ) { if ( empty ( $ field ) ) { throw new DefinitionException ( sprintf ( 'Invalid field name for relation "%s.%s" can not be empty' , $ this -> entity , $ field ) ) ; } if ( is_numeric ( $ field ) ) { throw new DefinitionException ( sprintf ( 'Invalid field name for relation "%s.%s" can not be numeric' , $ this -> entity , $ field ) ) ; } if ( ! is_string ( $ field ) ) { throw new DefinitionException ( sprintf ( 'Invalid field name for relation "%s.%s" must be string, %s given' , $ this -> entity , $ field , $ this -> getType ( $ field ) ) ) ; } }
Asserts field name

@param string $field

@throws DefinitionException
Asserts field name