serp-spider/core

View on GitHub
src/Core/Serp/ProxyResult.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * @license see LICENSE
 */

namespace Serps\Core\Serp;

class ProxyResult implements ResultDataInterface
{

    /**
     * @var ResultDataInterface
     */
    protected $itemData;

    public function __construct(ResultDataInterface $item)
    {
        $this->itemData = $item;
    }


    /**
     * @param array ...$type
     * @return bool
     */
    public function is($types)
    {
        $types = func_get_args();
        return call_user_func_array([$this->itemData, 'is'], $types);
    }

    public function getDataValue($name)
    {
        return $this->itemData->getDataValue($name);
    }

    public function __get($name)
    {
        return $this->itemData->getDataValue($name);
    }

    public function getData()
    {
        return $this->itemData->getData();
    }


    public function getTypes()
    {
        return $this->itemData->getTypes();
    }
}