lib/BlockCypher/Api/TX.php
public static function push($hexRawTx, $params = array(), $apiContext = null, $restCall = null)
    {
        ArgumentValidator::validate($hexRawTx, 'hexRawTx');
        ArgumentGetParamsValidator::validate($params, 'params');
        $allowedParams = array();
        $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams);

        $txHex = new TXHex();
        $txHex->setTx($hexRawTx);
        $payLoad = $txHex->toJSON();

        $chainUrlPrefix = self::getChainUrlPrefix($apiContext);

        $json = self::executeCall(
            "$chainUrlPrefix/txs/push?" . http_build_query($params),
            "POST",
            $payLoad,
            null,
            $apiContext,
            $restCall
        );
        $ret = new TX();
        $ret->fromJson($json);
        return $ret;
    }
public static function push($hexRawTx, $params = array(), $apiContext = null, $restCall = null)
    {
        ArgumentValidator::validate($hexRawTx, 'hexRawTx');
        ArgumentGetParamsValidator::validate($params, 'params');
        $allowedParams = array();
        $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams);

        $txHex = new TXHex();
        $txHex->setTx($hexRawTx);
        $payLoad = $txHex->toJSON();

        $chainUrlPrefix = self::getChainUrlPrefix($apiContext);

        $json = self::executeCall(
            "$chainUrlPrefix/txs/push?" . http_build_query($params),
            "POST",
            $payLoad,
            null,
            $apiContext,
            $restCall
        );
        $ret = new TX();
        $ret->fromJson($json);
        return $ret;
    }
public static function push ( $ hexRawTx , $ params = array ( ) , $ apiContext = null , $ restCall = null ) { ArgumentValidator :: validate ( $ hexRawTx , 'hexRawTx' ) ; ArgumentGetParamsValidator :: validate ( $ params , 'params' ) ; $ allowedParams = array ( ) ; $ params = ArgumentGetParamsValidator :: sanitize ( $ params , $ allowedParams ) ; $ txHex = new TXHex ( ) ; $ txHex -> setTx ( $ hexRawTx ) ; $ payLoad = $ txHex -> toJSON ( ) ; $ chainUrlPrefix = self :: getChainUrlPrefix ( $ apiContext ) ; $ json = self :: executeCall ( "$chainUrlPrefix/txs/push?" . http_build_query ( $ params ) , "POST" , $ payLoad , null , $ apiContext , $ restCall ) ; $ ret = new TX ( ) ; $ ret -> fromJson ( $ json ) ; return $ ret ; }
Push the raw transaction to the network.

@deprecated since version 1.2. Use TXClient.
@param string $hexRawTx
@param array $params Parameters. Options: instart, outstart and limit
@param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
@param BlockCypherRestCall $restCall is the Rest Call Service that is used to make rest calls
@return TX
Push the raw transaction to the network .