*
@param $data
@return PagSeguroItem
199715
private static function parseTransactionItem($data)
    {

        // <transaction> <items> <item>
        $item = new PagSeguroItem();

        // <transaction> <items> <item> <id>
        if (isset($data["id"])) {
            $item->setId($data["id"]);
        }

        // <transaction> <items> <item> <description>
        if (isset($data["description"])) {
            $item->setDescription($data["description"]);
        }

        // <transaction> <items> <item> <quantity>
        if (isset($data["quantity"])) {
            $item->setQuantity($data["quantity"]);
        }

        // <transaction> <items> <item> <amount>
        if (isset($data["amount"])) {
            $item->setAmount($data["amount"]);
        }

        // <transaction> <items> <item> <weight>
        if (isset($data["weight"])) {
            $item->setWeight($data["weight"]);
        }

        return $item;
    }
607838
public function distribute($data)
    {
        $callback = $this->callBacks[$data['token']];
        unset($this->callBacks[$data['token']]);
        if ($callback != null) {
            $callback($data['result']);
        }

        return $this;
    }
600045
public function create($data)
    {
        $propertyDescriptor = new PropertyDescriptor();
        $propertyDescriptor->setFullyQualifiedStructuralElementName($data->getName());
        $propertyDescriptor->setName($data->getShortName());
        $propertyDescriptor->setVisibility($data->getVisibility() ?: 'public');
        $propertyDescriptor->setStatic($data->isStatic());
        $propertyDescriptor->setDefault($data->getDefault());

        $this->assembleDocBlock($data->getDocBlock(), $propertyDescriptor);
        $propertyDescriptor->setLine($data->getLinenumber());

        return $propertyDescriptor;
    }
579601
public function create( $data )
    {
        $structure = parent::create( $data );

        if ( $structure instanceof Structure\ProxyAbstract )
        {
            $structure->prepareCreate();
        }

        return $structure;
    }
646519
public function create(array $data)
    {
        $response = $this->ontraport->post(
            $this->getNamespace(), $this->toArray($data)
        );

        return $this->ontraport->item($this, $response);
    }
751950
protected function normalizedTags($data) : Collection
	{
		return $data->has('tags')
			? Collection::make($data->get('tags'))
			: $data->pluck('tags');
	}
796817
public function automaticItemType($data)
	{
		if (isset($data['item_type']))
		{
			$data['item_type'] = strtolower(preg_replace("/[^a-zA-Z0-9\-]/", '', trim($data['item_type'])));
		}

		return $data['item_type'];
	}
380847
private function prepare($data)
    {
        foreach ($data as $code => &$item) {
            $item = $this->prepareItem($code, $item);
        }
        return $data;
    }
303013
public function make($data)
    {
        if ($data instanceof Collection) {
            $this->data = collect($data->toArray());
        } elseif (is_array($data)) {
            $this->data = collect($data);
        } else {
            throw new InvalidArgumentException('Invalid data type.');
        }

        $this->config = Config::get('nestable');

        $this->parent = $this->config['parent'];

        $this->primary_key = $this->config['primary_key'];

        return $this;
    }
563252
public function transform($data)
    {
        $output = $data;
        if (is_array($data)) {
            $output = "<ul>";
            foreach ($data as $item) {
                $output .= "<li>" . $this->transform($item) . "</li>";
            }
            $output .= "</ul>";
        }

        return $output;
    }
766199
private function createDataItems(array $data)
    {
        $items = [];
        foreach ($data as $item) {
            $items[$item['label']] = new UserDataItem(
                $item['label'],
                $item['value'],
                $item['isValid'],
                $item['isOwner']
            );
        }

        return $items;
    }
99512
public function create($data)
    {
        $seo = new SeoViewObject();

        if (empty($data)) {
            return $seo;
        }

        $seo->title = $data['title'];
        $seo->description = $data['description'];
        $seo->keywords = $data['keywords'];
        $seo->canonicalUrl = $data['canonicalUrl'];
        $seo->noIndex = $data['noIndex'];
        $seo->noFollow = $data['noFollow'];
        $seo->hideInSitemap = $data['hideInSitemap'];

        return $seo;
    }
708668
public function unserialize($data)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->list = json_decode($data, true);
        return $this;
    }
1342382
public function getContent(array $data)
    {
        $result = &gplcart_static(gplcart_array_hash(array('cart.get.content' => $data)));

        if (isset($result)) {
            return $result;
        }

        $this->hook->attach('cart.get.content.before', $data, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $data['order_id'] = 0;

        $items = $this->getList($data);

        if (empty($items)) {
            return array();
        }

        $result = array(
            'store_id' => $data['store_id'],
            'currency' => $this->currency->getCode()
        );

        $total = $quantity = 0;

        foreach ((array) $items as $item) {
            $prepared = $this->prepareItem($item, $result);
            if (!empty($prepared)) {
                $result['items'][$item['sku']] = $prepared;
                $total += (int) $prepared['total'];
                $quantity += (int) $prepared['quantity'];
            }
        }

        $result['total'] = $total;
        $result['quantity'] = $quantity;

        $this->hook->attach('cart.get.content.after', $data, $result, $this);
        return $result;
    }
593848
public static function normalizeArray($data)
    {
        if ($data instanceof DataObjectInterface) {
            $data = $data->getData();
        } else if ($data instanceof \ArrayObject) {
            $data = $data->getArrayCopy();
        } else if ($data instanceof \Traversable) {
            $data = iterator_to_array($data);
        }

        if (!is_array($data)) throw new \InvalidArgumentException();

        return $data;
    }
193558
public function createMenuNode($data) {
		$cls = $this->itemClass;
		$node = $cls::create($data, $this);
		$this->items[$node->ID] = $node;
		return $node;
	}
1150362
public function route($data)
    {
        if (is_array($data)) {
            $path = $data[0];
            $pkg = $data[1];
        } else {
            $path = $data;
        }

        $path = trim($path, '/');
        $pkgHandle = null;
        if ($pkg) {
            if (is_object($pkg)) {
                $pkgHandle = $pkg->getPackageHandle();
            } else {
                $pkgHandle = $pkg;
            }
        }

        $route = '/ccm';
        if ($pkgHandle) {
            $route .= "/{$pkgHandle}";
        } else {
            $route .= '/system';
        }

        $route .= "/{$path}";

        return $route;
    }