You are here

protected static function FeedImport::hasContent in Feed Import 7

Same name and namespace in other branches
  1. 7.2 feed_import.inc.php \FeedImport::hasContent()

Checks if a variable has content

Parameters

mixed $var: Variable to check

Return value

bool TRUE if there is content FALSE otherwise

1 call to FeedImport::hasContent()
FeedImport::createEntity in ./feed_import.inc.php
Create Entity object

File

./feed_import.inc.php, line 455
Feed import class for parsing and processing content

Class

FeedImport
@file Feed import class for parsing and processing content

Code

protected static function hasContent(&$var) {
  if (is_scalar($var)) {
    if ((string) $var === '') {
      return FALSE;
    }
  }
  elseif (empty($var)) {
    return FALSE;
  }
  return TRUE;
}