Evaluates the select.

@param array   $item
@param boolean $scalar

@return mixed
172567
protected function evaluateSelect(array $item, $scalar)
    {
        $resultItem = [];
        foreach ($item as $key => $value) {
            if (true === isset($this->select['*']) || true === isset($this->select[$key])) {
                if (true === isset($this->select[$key])) {
                    $value = $this->selectEvaluation->evaluate($value, $this->select[$key]);
                }
                if (true === $scalar) {
                    $resultItem = $value;
                } else {
                    $resultItem[$key] = $value;
                }
            }
        }

        return $resultItem;
    }
879467
public function convertBooleans($item)
    {
        if (! $this->useBooleanTrueFalseStrings) {
            return parent::convertBooleans($item);
        }

        return $this->doConvertBooleans(
            $item,
            static function ($boolean) {
                if ($boolean === null) {
                    return 'NULL';
                }

                return $boolean === true ? 'true' : 'false';
            }
        );
    }
23532
public function getValue($item, $columnName)
    {
        if (is_array($item)) {
            if (isset($item[$columnName])) {
                return $item[$columnName];
            } else {
                return '';
            }
        }

        $accessor = PropertyAccess::createPropertyAccessor();

        if ($accessor->isReadable($item, $columnName)) {
            $result = $accessor->getValue($item, $columnName);
        } else {
            return sprintf('undefined function [get/is/has]%s()', $columnName);
        }

        return $result;
    }
1302729
protected function extractValue($item, $key)
    {
        if (is_object($item)) {
            if (method_exists($item, 'hasMethod') && $item->hasMethod($key)) {
                return $item->{$key}();
            }
            return $item->{$key};
        } else {
            if (array_key_exists($key, $item)) {
                return $item[$key];
            }
        }
    }
325896
public function __item($item = null)
    {
        $result['name'] = $this->getName();
        $result['content'] = '0';
        $result['active'] = is_null($item) ? true : $item['active'];
        $result['settings'] = Eresus_CMS::getLegacyKernel()->db->
            escape(is_null($item) ? encodeOptions($this->settings) : $item['settings']);
        $result['title'] = $this->title;
        $result['version'] = $this->version;
        $result['description'] = $this->description;
        return $result;
    }
1298162
public function getValue($item, $columnName)
    {
        if ($columnName == 'title') {
            return $item->getDisplayTitle();
        } elseif ($columnName == 'online') {
            return $item;
        } elseif ($columnName == 'type') {
            if ($item->getType() == MenuItem::TYPE_PAGE_LINK) {
                return 'Page link';
            } else {
                return 'External link';
            }
        } elseif ($columnName == 'url') {
            return $item;
        }

        return parent::getValue($item, $columnName);
    }
37435
private function transform(array $item)
    {
        $value = static::jsonDeArmor($item['value']);

        if ($item['type'] === 'object' || $item['type'] === 'array') {
            return unserialize($value);
        }

        settype($value, $item['type']);

        return $value;
    }
1260987
function nestedArrayItemClearValues ($item) {
    // clear values on all inputs
    $item.find('input').each(function () {
        $(this).val('')
    })
    // clear selected flag on any select options
    $item.find('select').each(function () {
        $(this).find('option').each(function () {
            $(this).prop('selected', false)
        })
    })
}
360001
public function find($item = null, $array = null)
    {
        if(is_null($item)) return null;

        if(strpos($item, '.')) {
            $arr = explode('.', $item);
            if(count($arr) > 2 ) {
                $itemToSearch = join('.', array_slice($arr, 1));
            }
            else {
                $itemToSearch = $arr[1];
            }
            return $this->findItemIn($itemToSearch, $arr[0]);
        }
        else {
            $array = !is_null($array) ? $array : $this->settings;
            foreach ($array as $key => $value) {
                if($key === $item) {
                    $this->currentItem = $value;
                    $this->found = true;
                    break;
                }
                else {
                    if(is_array($value)) {
                        $this->find($item, $value);
                    }
                }
            }
        }

        if(!$this->found) {
            return false;
        }
        return $this->currentItem;
    }
754981
protected function checkList($item)
	{
		$inList = in_array($item, $this->list);
		
		$allow = null;
		
		if ($this->mode == self::MODE_BLACKLIST) {
			$allow = ! $inList;
		} else {
			$allow = $inList;
		}
		
		return $allow;
	}
1009456
public function setSelected($item) {
    if (!isset($this->entityMeta)) {
      throw new \Psc\Exception('EntityMeta muss übergeben werden wenn selected gesetzt wird');
    }
    
    $ec = $this->entityMeta->getClass();
    if (!($item instanceof $ec)) {
      throw new \InvalidArgumentException('Parameter Item für setSelected() muss vom Typ: '.$ec.' sein. '.Code::varInfo($item).' wurde übergeben');
    }
    
    $this->selected = $item;
    return $this;
  }
242410
protected function checkType($item)
    {
        if ($this->isCorrectType($item) === false) {
            $error = sprintf(
                '%s may contain only values of type %s, %s given.',
                get_class($this),
                $this->type,
                is_object($item) ? get_class($item) : gettype($item)
            );

            throw new InvalidArgumentException($error);
        }

        return true;
    }
398249
protected function getType( $item )
    {
        $type = gettype( $item );
        if ( is_object( $item ) )
            $type .= "[" . get_class( $item ) . "]";

        return $type;
    }
42768
private function unmarshal(array $item)
    {
        if ($item === null) {
            return null;
        }

        $map = [MapType::$dynamoKey => $item];

        return Type::convertUnmappedToPHPValue($map);
    }
836933
protected function enqueue($item) {
    $count = count($this->queue);

    if ($count > $this->max_queue_size) {
      return false;
    }

    $count = array_push($this->queue, $item);

    if ($count >= $this->batch_size) {
      return $this->flush(); // return ->flush() result: true on success
    }

    return true;
  }
222232
public static function create(Item $item){
        $returnValue = new Summation($item);
        foreach($item->getInteractions() as $interaction){
            $irp = InteractionResponseProcessing::create(
                            None::CLASS_ID
                            , $interaction->getResponse()
                            , $item
            );
            $returnValue->add($irp, $item);
        }

        return $returnValue;
    }
989052
public function fromItem(Item $item)
    {
        foreach ($this->readTransformers as $readTransformer) {
            if ($readTransformer->isValidItem($item)) {
                return $readTransformer->fromItem($item);
            }
        }

        return $item;
    }