How to use __construct method of report class

Best Atoum code snippet using report.__construct

ReportService.php

Source:ReportService.php Github

copy

Full Screen

...100 */101 public function getXsiTypeName() {102 return "ApiError";103 }104 public function __construct($fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {105 if(get_parent_class('ApiError')) parent::__construct();106 $this->fieldPath = $fieldPath;107 $this->trigger = $trigger;108 $this->errorString = $errorString;109 $this->ApiErrorType = $ApiErrorType;110 }111}}112if (!class_exists("ApiVersionError", FALSE)) {113/**114 * Errors related to the usage of API versions.115 * @package GoogleApiAdsDfp116 * @subpackage v201111117 */118class ApiVersionError extends ApiError {119 /**120 * @access public121 * @var tnsApiVersionErrorReason122 */123 public $reason;124 /**125 * Gets the namesapce of this class126 * @return the namespace of this class127 */128 public function getNamespace() {129 return "https://www.google.com/apis/ads/publisher/v201111";130 }131 /**132 * Gets the xsi:type name of this class133 * @return the xsi:type name of this class134 */135 public function getXsiTypeName() {136 return "ApiVersionError";137 }138 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {139 if(get_parent_class('ApiVersionError')) parent::__construct();140 $this->reason = $reason;141 $this->fieldPath = $fieldPath;142 $this->trigger = $trigger;143 $this->errorString = $errorString;144 $this->ApiErrorType = $ApiErrorType;145 }146}}147if (!class_exists("ApplicationException", FALSE)) {148/**149 * Base class for exceptions.150 * @package GoogleApiAdsDfp151 * @subpackage v201111152 */153class ApplicationException {154 /**155 * @access public156 * @var string157 */158 public $message;159 /**160 * @access public161 * @var string162 */163 public $ApplicationExceptionType;164 private $_parameterMap = array (165 "ApplicationException.Type" => "ApplicationExceptionType",166 );167 /**168 * Provided for setting non-php-standard named variables169 * @param $var Variable name to set170 * @param $value Value to set171 */172 public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }173 /**174 * Provided for getting non-php-standard named variables175 * @param $var Variable name to get.176 * @return mixed Variable value177 */178 public function __get($var) {179 if (!array_key_exists($var, $this->_parameterMap)) {180 return NULL;181 } else {182 return $this->{$this->_parameterMap[$var]};183 }184 }185 /**186 * Provided for getting non-php-standard named variables187 * @return array parameter map188 */189 protected function getParameterMap() {190 return $this->_parameterMap;191 }192 /**193 * Gets the namesapce of this class194 * @return the namespace of this class195 */196 public function getNamespace() {197 return "https://www.google.com/apis/ads/publisher/v201111";198 }199 /**200 * Gets the xsi:type name of this class201 * @return the xsi:type name of this class202 */203 public function getXsiTypeName() {204 return "ApplicationException";205 }206 public function __construct($message = NULL, $ApplicationExceptionType = NULL) {207 if(get_parent_class('ApplicationException')) parent::__construct();208 $this->message = $message;209 $this->ApplicationExceptionType = $ApplicationExceptionType;210 }211}}212if (!class_exists("Authentication", FALSE)) {213/**214 * A representation of the authentication protocols that can be used.215 * @package GoogleApiAdsDfp216 * @subpackage v201111217 */218class Authentication {219 /**220 * @access public221 * @var string222 */223 public $AuthenticationType;224 private $_parameterMap = array (225 "Authentication.Type" => "AuthenticationType",226 );227 /**228 * Provided for setting non-php-standard named variables229 * @param $var Variable name to set230 * @param $value Value to set231 */232 public function __set($var, $value) { $this->{$this->_parameterMap[$var]} = $value; }233 /**234 * Provided for getting non-php-standard named variables235 * @param $var Variable name to get.236 * @return mixed Variable value237 */238 public function __get($var) {239 if (!array_key_exists($var, $this->_parameterMap)) {240 return NULL;241 } else {242 return $this->{$this->_parameterMap[$var]};243 }244 }245 /**246 * Provided for getting non-php-standard named variables247 * @return array parameter map248 */249 protected function getParameterMap() {250 return $this->_parameterMap;251 }252 /**253 * Gets the namesapce of this class254 * @return the namespace of this class255 */256 public function getNamespace() {257 return "https://www.google.com/apis/ads/publisher/v201111";258 }259 /**260 * Gets the xsi:type name of this class261 * @return the xsi:type name of this class262 */263 public function getXsiTypeName() {264 return "Authentication";265 }266 public function __construct($AuthenticationType = NULL) {267 if(get_parent_class('Authentication')) parent::__construct();268 $this->AuthenticationType = $AuthenticationType;269 }270}}271if (!class_exists("AuthenticationError", FALSE)) {272/**273 * An error for an exception that occurred when authenticating.274 * @package GoogleApiAdsDfp275 * @subpackage v201111276 */277class AuthenticationError extends ApiError {278 /**279 * @access public280 * @var tnsAuthenticationErrorReason281 */282 public $reason;283 /**284 * Gets the namesapce of this class285 * @return the namespace of this class286 */287 public function getNamespace() {288 return "https://www.google.com/apis/ads/publisher/v201111";289 }290 /**291 * Gets the xsi:type name of this class292 * @return the xsi:type name of this class293 */294 public function getXsiTypeName() {295 return "AuthenticationError";296 }297 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {298 if(get_parent_class('AuthenticationError')) parent::__construct();299 $this->reason = $reason;300 $this->fieldPath = $fieldPath;301 $this->trigger = $trigger;302 $this->errorString = $errorString;303 $this->ApiErrorType = $ApiErrorType;304 }305}}306if (!class_exists("ClientLogin", FALSE)) {307/**308 * The credentials for the {@code ClientLogin} API authentication protocol.309 * 310 * See {@link http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html}.311 * @package GoogleApiAdsDfp312 * @subpackage v201111313 */314class ClientLogin extends Authentication {315 /**316 * @access public317 * @var string318 */319 public $token;320 /**321 * Gets the namesapce of this class322 * @return the namespace of this class323 */324 public function getNamespace() {325 return "https://www.google.com/apis/ads/publisher/v201111";326 }327 /**328 * Gets the xsi:type name of this class329 * @return the xsi:type name of this class330 */331 public function getXsiTypeName() {332 return "ClientLogin";333 }334 public function __construct($token = NULL, $AuthenticationType = NULL) {335 if(get_parent_class('ClientLogin')) parent::__construct();336 $this->token = $token;337 $this->AuthenticationType = $AuthenticationType;338 }339}}340if (!class_exists("CommonError", FALSE)) {341/**342 * A place for common errors that can be used across services.343 * @package GoogleApiAdsDfp344 * @subpackage v201111345 */346class CommonError extends ApiError {347 /**348 * @access public349 * @var tnsCommonErrorReason350 */351 public $reason;352 /**353 * Gets the namesapce of this class354 * @return the namespace of this class355 */356 public function getNamespace() {357 return "https://www.google.com/apis/ads/publisher/v201111";358 }359 /**360 * Gets the xsi:type name of this class361 * @return the xsi:type name of this class362 */363 public function getXsiTypeName() {364 return "CommonError";365 }366 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {367 if(get_parent_class('CommonError')) parent::__construct();368 $this->reason = $reason;369 $this->fieldPath = $fieldPath;370 $this->trigger = $trigger;371 $this->errorString = $errorString;372 $this->ApiErrorType = $ApiErrorType;373 }374}}375if (!class_exists("Date", FALSE)) {376/**377 * Represents a date.378 * @package GoogleApiAdsDfp379 * @subpackage v201111380 */381class Date {382 /**383 * @access public384 * @var integer385 */386 public $year;387 /**388 * @access public389 * @var integer390 */391 public $month;392 /**393 * @access public394 * @var integer395 */396 public $day;397 /**398 * Gets the namesapce of this class399 * @return the namespace of this class400 */401 public function getNamespace() {402 return "https://www.google.com/apis/ads/publisher/v201111";403 }404 /**405 * Gets the xsi:type name of this class406 * @return the xsi:type name of this class407 */408 public function getXsiTypeName() {409 return "Date";410 }411 public function __construct($year = NULL, $month = NULL, $day = NULL) {412 if(get_parent_class('Date')) parent::__construct();413 $this->year = $year;414 $this->month = $month;415 $this->day = $day;416 }417}}418if (!class_exists("InternalApiError", FALSE)) {419/**420 * Indicates that a server-side error has occured. {@code InternalApiError}s421 * are generally not the result of an invalid request or message sent by the422 * client.423 * @package GoogleApiAdsDfp424 * @subpackage v201111425 */426class InternalApiError extends ApiError {427 /**428 * @access public429 * @var tnsInternalApiErrorReason430 */431 public $reason;432 /**433 * Gets the namesapce of this class434 * @return the namespace of this class435 */436 public function getNamespace() {437 return "https://www.google.com/apis/ads/publisher/v201111";438 }439 /**440 * Gets the xsi:type name of this class441 * @return the xsi:type name of this class442 */443 public function getXsiTypeName() {444 return "InternalApiError";445 }446 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {447 if(get_parent_class('InternalApiError')) parent::__construct();448 $this->reason = $reason;449 $this->fieldPath = $fieldPath;450 $this->trigger = $trigger;451 $this->errorString = $errorString;452 $this->ApiErrorType = $ApiErrorType;453 }454}}455if (!class_exists("NotNullError", FALSE)) {456/**457 * Caused by supplying a null value for an attribute that cannot be null.458 * @package GoogleApiAdsDfp459 * @subpackage v201111460 */461class NotNullError extends ApiError {462 /**463 * @access public464 * @var tnsNotNullErrorReason465 */466 public $reason;467 /**468 * Gets the namesapce of this class469 * @return the namespace of this class470 */471 public function getNamespace() {472 return "https://www.google.com/apis/ads/publisher/v201111";473 }474 /**475 * Gets the xsi:type name of this class476 * @return the xsi:type name of this class477 */478 public function getXsiTypeName() {479 return "NotNullError";480 }481 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {482 if(get_parent_class('NotNullError')) parent::__construct();483 $this->reason = $reason;484 $this->fieldPath = $fieldPath;485 $this->trigger = $trigger;486 $this->errorString = $errorString;487 $this->ApiErrorType = $ApiErrorType;488 }489}}490if (!class_exists("DfpOAuth", FALSE)) {491/**492 * The credentials for the {@code OAuth} authentication protocol.493 * 494 * See {@link http://oauth.net/}.495 * @package GoogleApiAdsDfp496 * @subpackage v201111497 */498class DfpOAuth extends Authentication {499 /**500 * @access public501 * @var string502 */503 public $parameters;504 /**505 * Gets the namesapce of this class506 * @return the namespace of this class507 */508 public function getNamespace() {509 return "https://www.google.com/apis/ads/publisher/v201111";510 }511 /**512 * Gets the xsi:type name of this class513 * @return the xsi:type name of this class514 */515 public function getXsiTypeName() {516 return "OAuth";517 }518 public function __construct($parameters = NULL, $AuthenticationType = NULL) {519 if(get_parent_class('DfpOAuth')) parent::__construct();520 $this->parameters = $parameters;521 $this->AuthenticationType = $AuthenticationType;522 }523}}524if (!class_exists("PermissionError", FALSE)) {525/**526 * Errors related to incorrect permission.527 * @package GoogleApiAdsDfp528 * @subpackage v201111529 */530class PermissionError extends ApiError {531 /**532 * @access public533 * @var tnsPermissionErrorReason534 */535 public $reason;536 /**537 * Gets the namesapce of this class538 * @return the namespace of this class539 */540 public function getNamespace() {541 return "https://www.google.com/apis/ads/publisher/v201111";542 }543 /**544 * Gets the xsi:type name of this class545 * @return the xsi:type name of this class546 */547 public function getXsiTypeName() {548 return "PermissionError";549 }550 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {551 if(get_parent_class('PermissionError')) parent::__construct();552 $this->reason = $reason;553 $this->fieldPath = $fieldPath;554 $this->trigger = $trigger;555 $this->errorString = $errorString;556 $this->ApiErrorType = $ApiErrorType;557 }558}}559if (!class_exists("QuotaError", FALSE)) {560/**561 * Describes a client-side error on which a user is attempting562 * to perform an action to which they have no quota remaining.563 * @package GoogleApiAdsDfp564 * @subpackage v201111565 */566class QuotaError extends ApiError {567 /**568 * @access public569 * @var tnsQuotaErrorReason570 */571 public $reason;572 /**573 * Gets the namesapce of this class574 * @return the namespace of this class575 */576 public function getNamespace() {577 return "https://www.google.com/apis/ads/publisher/v201111";578 }579 /**580 * Gets the xsi:type name of this class581 * @return the xsi:type name of this class582 */583 public function getXsiTypeName() {584 return "QuotaError";585 }586 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {587 if(get_parent_class('QuotaError')) parent::__construct();588 $this->reason = $reason;589 $this->fieldPath = $fieldPath;590 $this->trigger = $trigger;591 $this->errorString = $errorString;592 $this->ApiErrorType = $ApiErrorType;593 }594}}595if (!class_exists("ReportError", FALSE)) {596/**597 * An error for an exception that occurred while running the report.598 * @package GoogleApiAdsDfp599 * @subpackage v201111600 */601class ReportError extends ApiError {602 /**603 * @access public604 * @var tnsReportErrorReason605 */606 public $reason;607 /**608 * Gets the namesapce of this class609 * @return the namespace of this class610 */611 public function getNamespace() {612 return "https://www.google.com/apis/ads/publisher/v201111";613 }614 /**615 * Gets the xsi:type name of this class616 * @return the xsi:type name of this class617 */618 public function getXsiTypeName() {619 return "ReportError";620 }621 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {622 if(get_parent_class('ReportError')) parent::__construct();623 $this->reason = $reason;624 $this->fieldPath = $fieldPath;625 $this->trigger = $trigger;626 $this->errorString = $errorString;627 $this->ApiErrorType = $ApiErrorType;628 }629}}630if (!class_exists("ReportJob", FALSE)) {631/**632 * Represents a report job that will be run to retrieve performance and633 * statistics information about ad campaigns, networks, inventory and sales.634 * @package GoogleApiAdsDfp635 * @subpackage v201111636 */637class ReportJob {638 /**639 * @access public640 * @var integer641 */642 public $id;643 /**644 * @access public645 * @var ReportQuery646 */647 public $reportQuery;648 /**649 * @access public650 * @var tnsReportJobStatus651 */652 public $reportJobStatus;653 /**654 * Gets the namesapce of this class655 * @return the namespace of this class656 */657 public function getNamespace() {658 return "https://www.google.com/apis/ads/publisher/v201111";659 }660 /**661 * Gets the xsi:type name of this class662 * @return the xsi:type name of this class663 */664 public function getXsiTypeName() {665 return "ReportJob";666 }667 public function __construct($id = NULL, $reportQuery = NULL, $reportJobStatus = NULL) {668 if(get_parent_class('ReportJob')) parent::__construct();669 $this->id = $id;670 $this->reportQuery = $reportQuery;671 $this->reportJobStatus = $reportJobStatus;672 }673}}674if (!class_exists("ReportQuery", FALSE)) {675/**676 * A {@code ReportQuery} object allows you to specify the selection criteria for677 * generating a report.678 * @package GoogleApiAdsDfp679 * @subpackage v201111680 */681class ReportQuery {682 /**683 * @access public684 * @var tnsDimension[]685 */686 public $dimensions;687 /**688 * @access public689 * @var tnsColumn[]690 */691 public $columns;692 /**693 * @access public694 * @var tnsDimensionAttribute[]695 */696 public $dimensionAttributes;697 /**698 * @access public699 * @var Date700 */701 public $startDate;702 /**703 * @access public704 * @var Date705 */706 public $endDate;707 /**708 * @access public709 * @var tnsDateRangeType710 */711 public $dateRangeType;712 /**713 * @access public714 * @var tnsDimensionFilter[]715 */716 public $dimensionFilters;717 /**718 * Gets the namesapce of this class719 * @return the namespace of this class720 */721 public function getNamespace() {722 return "https://www.google.com/apis/ads/publisher/v201111";723 }724 /**725 * Gets the xsi:type name of this class726 * @return the xsi:type name of this class727 */728 public function getXsiTypeName() {729 return "ReportQuery";730 }731 public function __construct($dimensions = NULL, $columns = NULL, $dimensionAttributes = NULL, $startDate = NULL, $endDate = NULL, $dateRangeType = NULL, $dimensionFilters = NULL) {732 if(get_parent_class('ReportQuery')) parent::__construct();733 $this->dimensions = $dimensions;734 $this->columns = $columns;735 $this->dimensionAttributes = $dimensionAttributes;736 $this->startDate = $startDate;737 $this->endDate = $endDate;738 $this->dateRangeType = $dateRangeType;739 $this->dimensionFilters = $dimensionFilters;740 }741}}742if (!class_exists("RequiredError", FALSE)) {743/**744 * Errors due to missing required field.745 * @package GoogleApiAdsDfp746 * @subpackage v201111747 */748class RequiredError extends ApiError {749 /**750 * @access public751 * @var tnsRequiredErrorReason752 */753 public $reason;754 /**755 * Gets the namesapce of this class756 * @return the namespace of this class757 */758 public function getNamespace() {759 return "https://www.google.com/apis/ads/publisher/v201111";760 }761 /**762 * Gets the xsi:type name of this class763 * @return the xsi:type name of this class764 */765 public function getXsiTypeName() {766 return "RequiredError";767 }768 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {769 if(get_parent_class('RequiredError')) parent::__construct();770 $this->reason = $reason;771 $this->fieldPath = $fieldPath;772 $this->trigger = $trigger;773 $this->errorString = $errorString;774 $this->ApiErrorType = $ApiErrorType;775 }776}}777if (!class_exists("ServerError", FALSE)) {778/**779 * Errors related to the server.780 * @package GoogleApiAdsDfp781 * @subpackage v201111782 */783class ServerError extends ApiError {784 /**785 * @access public786 * @var tnsServerErrorReason787 */788 public $reason;789 /**790 * Gets the namesapce of this class791 * @return the namespace of this class792 */793 public function getNamespace() {794 return "https://www.google.com/apis/ads/publisher/v201111";795 }796 /**797 * Gets the xsi:type name of this class798 * @return the xsi:type name of this class799 */800 public function getXsiTypeName() {801 return "ServerError";802 }803 public function __construct($reason = NULL, $fieldPath = NULL, $trigger = NULL, $errorString = NULL, $ApiErrorType = NULL) {804 if(get_parent_class('ServerError')) parent::__construct();805 $this->reason = $reason;806 $this->fieldPath = $fieldPath;807 $this->trigger = $trigger;808 $this->errorString = $errorString;809 $this->ApiErrorType = $ApiErrorType;810 }811}}812if (!class_exists("SoapRequestHeader", FALSE)) {813/**814 * Represents the SOAP request header used by API requests.815 * @package GoogleApiAdsDfp816 * @subpackage v201111817 */818class SoapRequestHeader {819 /**820 * @access public821 * @var string822 */823 public $networkCode;824 /**825 * @access public826 * @var string827 */828 public $applicationName;829 /**830 * @access public831 * @var Authentication832 */833 public $authentication;834 /**835 * Gets the namesapce of this class836 * @return the namespace of this class837 */838 public function getNamespace() {839 return "https://www.google.com/apis/ads/publisher/v201111";840 }841 /**842 * Gets the xsi:type name of this class843 * @return the xsi:type name of this class844 */845 public function getXsiTypeName() {846 return "SoapRequestHeader";847 }848 public function __construct($networkCode = NULL, $applicationName = NULL, $authentication = NULL) {849 if(get_parent_class('SoapRequestHeader')) parent::__construct();850 $this->networkCode = $networkCode;851 $this->applicationName = $applicationName;852 $this->authentication = $authentication;853 }854}}855if (!class_exists("SoapResponseHeader", FALSE)) {856/**857 * Represents the SOAP request header used by API responses.858 * @package GoogleApiAdsDfp859 * @subpackage v201111860 */861class SoapResponseHeader {862 /**863 * @access public864 * @var string865 */866 public $requestId;867 /**868 * @access public869 * @var integer870 */871 public $responseTime;872 /**873 * Gets the namesapce of this class874 * @return the namespace of this class875 */876 public function getNamespace() {877 return "https://www.google.com/apis/ads/publisher/v201111";878 }879 /**880 * Gets the xsi:type name of this class881 * @return the xsi:type name of this class882 */883 public function getXsiTypeName() {884 return "SoapResponseHeader";885 }886 public function __construct($requestId = NULL, $responseTime = NULL) {887 if(get_parent_class('SoapResponseHeader')) parent::__construct();888 $this->requestId = $requestId;889 $this->responseTime = $responseTime;890 }891}}892if (!class_exists("ApiVersionErrorReason", FALSE)) {893/**894 * Indicates that the operation is not allowed in the version the request895 * was made in.896 * @package GoogleApiAdsDfp897 * @subpackage v201111898 */899class ApiVersionErrorReason {900 /**901 * Gets the namesapce of this class902 * @return the namespace of this class903 */904 public function getNamespace() {905 return "https://www.google.com/apis/ads/publisher/v201111";906 }907 /**908 * Gets the xsi:type name of this class909 * @return the xsi:type name of this class910 */911 public function getXsiTypeName() {912 return "ApiVersionError.Reason";913 }914 public function __construct() {915 if(get_parent_class('ApiVersionErrorReason')) parent::__construct();916 }917}}918if (!class_exists("AuthenticationErrorReason", FALSE)) {919/**920 * The SOAP message contains a request header with an ambiguous definition921 * of the authentication header fields. This means either the {@code922 * authToken} and {@code oAuthToken} fields were both null or both were923 * specified. Exactly one value should be specified with each request.924 * @package GoogleApiAdsDfp925 * @subpackage v201111926 */927class AuthenticationErrorReason {928 /**929 * Gets the namesapce of this class930 * @return the namespace of this class931 */932 public function getNamespace() {933 return "https://www.google.com/apis/ads/publisher/v201111";934 }935 /**936 * Gets the xsi:type name of this class937 * @return the xsi:type name of this class938 */939 public function getXsiTypeName() {940 return "AuthenticationError.Reason";941 }942 public function __construct() {943 if(get_parent_class('AuthenticationErrorReason')) parent::__construct();944 }945}}946if (!class_exists("Column", FALSE)) {947/**948 * {@code Column} provides all the trafficking statistics and revenue949 * information available for the chosen {@link Dimension} objects.950 * @package GoogleApiAdsDfp951 * @subpackage v201111952 */953class Column {954 /**955 * Gets the namesapce of this class956 * @return the namespace of this class957 */958 public function getNamespace() {959 return "https://www.google.com/apis/ads/publisher/v201111";960 }961 /**962 * Gets the xsi:type name of this class963 * @return the xsi:type name of this class964 */965 public function getXsiTypeName() {966 return "Column";967 }968 public function __construct() {969 if(get_parent_class('Column')) parent::__construct();970 }971}}972if (!class_exists("CommonErrorReason", FALSE)) {973/**974 * Describes reasons for common errors975 * @package GoogleApiAdsDfp976 * @subpackage v201111977 */978class CommonErrorReason {979 /**980 * Gets the namesapce of this class981 * @return the namespace of this class982 */983 public function getNamespace() {984 return "https://www.google.com/apis/ads/publisher/v201111";985 }986 /**987 * Gets the xsi:type name of this class988 * @return the xsi:type name of this class989 */990 public function getXsiTypeName() {991 return "CommonError.Reason";992 }993 public function __construct() {994 if(get_parent_class('CommonErrorReason')) parent::__construct();995 }996}}997if (!class_exists("DateRangeType", FALSE)) {998/**999 * Represents a period of time.1000 * @package GoogleApiAdsDfp1001 * @subpackage v2011111002 */1003class DateRangeType {1004 /**1005 * Gets the namesapce of this class1006 * @return the namespace of this class1007 */1008 public function getNamespace() {1009 return "https://www.google.com/apis/ads/publisher/v201111";1010 }1011 /**1012 * Gets the xsi:type name of this class1013 * @return the xsi:type name of this class1014 */1015 public function getXsiTypeName() {1016 return "DateRangeType";1017 }1018 public function __construct() {1019 if(get_parent_class('DateRangeType')) parent::__construct();1020 }1021}}1022if (!class_exists("Dimension", FALSE)) {1023/**1024 * {@code Dimension} provides the break-down types available for running a1025 * {@link ReportJob}. Aggregate and percentage columns will be calculated on1026 * these groupings.1027 * @package GoogleApiAdsDfp1028 * @subpackage v2011111029 */1030class Dimension {1031 /**1032 * Gets the namesapce of this class1033 * @return the namespace of this class1034 */1035 public function getNamespace() {1036 return "https://www.google.com/apis/ads/publisher/v201111";1037 }1038 /**1039 * Gets the xsi:type name of this class1040 * @return the xsi:type name of this class1041 */1042 public function getXsiTypeName() {1043 return "Dimension";1044 }1045 public function __construct() {1046 if(get_parent_class('Dimension')) parent::__construct();1047 }1048}}1049if (!class_exists("DimensionAttribute", FALSE)) {1050/**1051 * {@code DimensionAttribue} provides additional fields associated with a1052 * {@link Dimension}. It can only be selected with its corresponding1053 * {@link Dimension}. For example, {@link DimensionAttribute#ORDER_PO_NUMBER}1054 * can only be used if the {@link ReportQuery#dimensions} contains1055 * {@link Dimension#ORDER}.1056 * @package GoogleApiAdsDfp1057 * @subpackage v2011111058 */1059class DimensionAttribute {1060 /**1061 * Gets the namesapce of this class1062 * @return the namespace of this class1063 */1064 public function getNamespace() {1065 return "https://www.google.com/apis/ads/publisher/v201111";1066 }1067 /**1068 * Gets the xsi:type name of this class1069 * @return the xsi:type name of this class1070 */1071 public function getXsiTypeName() {1072 return "DimensionAttribute";1073 }1074 public function __construct() {1075 if(get_parent_class('DimensionAttribute')) parent::__construct();1076 }1077}}1078if (!class_exists("DimensionFilter", FALSE)) {1079/**1080 * {@code DimensionFilter} filters the data used during report creation.1081 * @package GoogleApiAdsDfp1082 * @subpackage v2011111083 */1084class DimensionFilter {1085 /**1086 * Gets the namesapce of this class1087 * @return the namespace of this class1088 */1089 public function getNamespace() {1090 return "https://www.google.com/apis/ads/publisher/v201111";1091 }1092 /**1093 * Gets the xsi:type name of this class1094 * @return the xsi:type name of this class1095 */1096 public function getXsiTypeName() {1097 return "DimensionFilter";1098 }1099 public function __construct() {1100 if(get_parent_class('DimensionFilter')) parent::__construct();1101 }1102}}1103if (!class_exists("ExportFormat", FALSE)) {1104/**1105 * The file formats available for creating the report.1106 * @package GoogleApiAdsDfp1107 * @subpackage v2011111108 */1109class ExportFormat {1110 /**1111 * Gets the namesapce of this class1112 * @return the namespace of this class1113 */1114 public function getNamespace() {1115 return "https://www.google.com/apis/ads/publisher/v201111";1116 }1117 /**1118 * Gets the xsi:type name of this class1119 * @return the xsi:type name of this class1120 */1121 public function getXsiTypeName() {1122 return "ExportFormat";1123 }1124 public function __construct() {1125 if(get_parent_class('ExportFormat')) parent::__construct();1126 }1127}}1128if (!class_exists("InternalApiErrorReason", FALSE)) {1129/**1130 * The single reason for the internal API error.1131 * @package GoogleApiAdsDfp1132 * @subpackage v2011111133 */1134class InternalApiErrorReason {1135 /**1136 * Gets the namesapce of this class1137 * @return the namespace of this class1138 */1139 public function getNamespace() {1140 return "https://www.google.com/apis/ads/publisher/v201111";1141 }1142 /**1143 * Gets the xsi:type name of this class1144 * @return the xsi:type name of this class1145 */1146 public function getXsiTypeName() {1147 return "InternalApiError.Reason";1148 }1149 public function __construct() {1150 if(get_parent_class('InternalApiErrorReason')) parent::__construct();1151 }1152}}1153if (!class_exists("NotNullErrorReason", FALSE)) {1154/**1155 * The reasons for the target error.1156 * @package GoogleApiAdsDfp1157 * @subpackage v2011111158 */1159class NotNullErrorReason {1160 /**1161 * Gets the namesapce of this class1162 * @return the namespace of this class1163 */1164 public function getNamespace() {1165 return "https://www.google.com/apis/ads/publisher/v201111";1166 }1167 /**1168 * Gets the xsi:type name of this class1169 * @return the xsi:type name of this class1170 */1171 public function getXsiTypeName() {1172 return "NotNullError.Reason";1173 }1174 public function __construct() {1175 if(get_parent_class('NotNullErrorReason')) parent::__construct();1176 }1177}}1178if (!class_exists("PermissionErrorReason", FALSE)) {1179/**1180 * Describes reasons for permission errors.1181 * @package GoogleApiAdsDfp1182 * @subpackage v2011111183 */1184class PermissionErrorReason {1185 /**1186 * Gets the namesapce of this class1187 * @return the namespace of this class1188 */1189 public function getNamespace() {1190 return "https://www.google.com/apis/ads/publisher/v201111";1191 }1192 /**1193 * Gets the xsi:type name of this class1194 * @return the xsi:type name of this class1195 */1196 public function getXsiTypeName() {1197 return "PermissionError.Reason";1198 }1199 public function __construct() {1200 if(get_parent_class('PermissionErrorReason')) parent::__construct();1201 }1202}}1203if (!class_exists("QuotaErrorReason", FALSE)) {1204/**1205 * The number of requests made per second is too high and has exceeded the1206 * allowable limit. Please wait before trying your request again. If you see1207 * this error often, try increasing the wait time between requests.1208 * @package GoogleApiAdsDfp1209 * @subpackage v2011111210 */1211class QuotaErrorReason {1212 /**1213 * Gets the namesapce of this class1214 * @return the namespace of this class1215 */1216 public function getNamespace() {1217 return "https://www.google.com/apis/ads/publisher/v201111";1218 }1219 /**1220 * Gets the xsi:type name of this class1221 * @return the xsi:type name of this class1222 */1223 public function getXsiTypeName() {1224 return "QuotaError.Reason";1225 }1226 public function __construct() {1227 if(get_parent_class('QuotaErrorReason')) parent::__construct();1228 }1229}}1230if (!class_exists("ReportErrorReason", FALSE)) {1231/**1232 * Default {@code ReportError} when the reason is not among any already1233 * defined.1234 * @package GoogleApiAdsDfp1235 * @subpackage v2011111236 */1237class ReportErrorReason {1238 /**1239 * Gets the namesapce of this class1240 * @return the namespace of this class1241 */1242 public function getNamespace() {1243 return "https://www.google.com/apis/ads/publisher/v201111";1244 }1245 /**1246 * Gets the xsi:type name of this class1247 * @return the xsi:type name of this class1248 */1249 public function getXsiTypeName() {1250 return "ReportError.Reason";1251 }1252 public function __construct() {1253 if(get_parent_class('ReportErrorReason')) parent::__construct();1254 }1255}}1256if (!class_exists("ReportJobStatus", FALSE)) {1257/**1258 * Represents the status of a {@link ReportJob} running on the server.1259 * @package GoogleApiAdsDfp1260 * @subpackage v2011111261 */1262class ReportJobStatus {1263 /**1264 * Gets the namesapce of this class1265 * @return the namespace of this class1266 */1267 public function getNamespace() {1268 return "https://www.google.com/apis/ads/publisher/v201111";1269 }1270 /**1271 * Gets the xsi:type name of this class1272 * @return the xsi:type name of this class1273 */1274 public function getXsiTypeName() {1275 return "ReportJobStatus";1276 }1277 public function __construct() {1278 if(get_parent_class('ReportJobStatus')) parent::__construct();1279 }1280}}1281if (!class_exists("RequiredErrorReason", FALSE)) {1282/**1283 * The reasons for the target error.1284 * @package GoogleApiAdsDfp1285 * @subpackage v2011111286 */1287class RequiredErrorReason {1288 /**1289 * Gets the namesapce of this class1290 * @return the namespace of this class1291 */1292 public function getNamespace() {1293 return "https://www.google.com/apis/ads/publisher/v201111";1294 }1295 /**1296 * Gets the xsi:type name of this class1297 * @return the xsi:type name of this class1298 */1299 public function getXsiTypeName() {1300 return "RequiredError.Reason";1301 }1302 public function __construct() {1303 if(get_parent_class('RequiredErrorReason')) parent::__construct();1304 }1305}}1306if (!class_exists("ServerErrorReason", FALSE)) {1307/**1308 * Describes reasons for server errors1309 * @package GoogleApiAdsDfp1310 * @subpackage v2011111311 */1312class ServerErrorReason {1313 /**1314 * Gets the namesapce of this class1315 * @return the namespace of this class1316 */1317 public function getNamespace() {1318 return "https://www.google.com/apis/ads/publisher/v201111";1319 }1320 /**1321 * Gets the xsi:type name of this class1322 * @return the xsi:type name of this class1323 */1324 public function getXsiTypeName() {1325 return "ServerError.Reason";1326 }1327 public function __construct() {1328 if(get_parent_class('ServerErrorReason')) parent::__construct();1329 }1330}}1331if (!class_exists("getReportDownloadURL", FALSE)) {1332/**1333 * Returns the URL at which the report file can be downloaded.1334 * 1335 * @param reportJobId the ID of the {@link ReportJob}1336 * @param exportFormat the {@link ExportFormat} for the report file1337 * @return the URL for report file download1338 * @package GoogleApiAdsDfp1339 * @subpackage v2011111340 */1341class getReportDownloadURL {1342 /**1343 * @access public1344 * @var integer1345 */1346 public $reportJobId;1347 /**1348 * @access public1349 * @var tnsExportFormat1350 */1351 public $exportFormat;1352 /**1353 * Gets the namesapce of this class1354 * @return the namespace of this class1355 */1356 public function getNamespace() {1357 return "https://www.google.com/apis/ads/publisher/v201111";1358 }1359 /**1360 * Gets the xsi:type name of this class1361 * @return the xsi:type name of this class1362 */1363 public function getXsiTypeName() {1364 return "";1365 }1366 public function __construct($reportJobId = NULL, $exportFormat = NULL) {1367 if(get_parent_class('getReportDownloadURL')) parent::__construct();1368 $this->reportJobId = $reportJobId;1369 $this->exportFormat = $exportFormat;1370 }1371}}1372if (!class_exists("getReportDownloadURLResponse", FALSE)) {1373/**1374 * 1375 * @package GoogleApiAdsDfp1376 * @subpackage v2011111377 */1378class getReportDownloadURLResponse {1379 /**1380 * @access public1381 * @var string1382 */1383 public $rval;1384 /**1385 * Gets the namesapce of this class1386 * @return the namespace of this class1387 */1388 public function getNamespace() {1389 return "https://www.google.com/apis/ads/publisher/v201111";1390 }1391 /**1392 * Gets the xsi:type name of this class1393 * @return the xsi:type name of this class1394 */1395 public function getXsiTypeName() {1396 return "";1397 }1398 public function __construct($rval = NULL) {1399 if(get_parent_class('getReportDownloadURLResponse')) parent::__construct();1400 $this->rval = $rval;1401 }1402}}1403if (!class_exists("getReportJob", FALSE)) {1404/**1405 * Returns the {@link ReportJob} uniquely identified by the given ID.1406 * 1407 * @param reportJobId the Id of the report job which must already exist1408 * @return the {@code ReportJob} uniquely identified by the given ID1409 * @package GoogleApiAdsDfp1410 * @subpackage v2011111411 */1412class getReportJob {1413 /**1414 * @access public1415 * @var integer1416 */1417 public $reportJobId;1418 /**1419 * Gets the namesapce of this class1420 * @return the namespace of this class1421 */1422 public function getNamespace() {1423 return "https://www.google.com/apis/ads/publisher/v201111";1424 }1425 /**1426 * Gets the xsi:type name of this class1427 * @return the xsi:type name of this class1428 */1429 public function getXsiTypeName() {1430 return "";1431 }1432 public function __construct($reportJobId = NULL) {1433 if(get_parent_class('getReportJob')) parent::__construct();1434 $this->reportJobId = $reportJobId;1435 }1436}}1437if (!class_exists("getReportJobResponse", FALSE)) {1438/**1439 * 1440 * @package GoogleApiAdsDfp1441 * @subpackage v2011111442 */1443class getReportJobResponse {1444 /**1445 * @access public1446 * @var ReportJob1447 */1448 public $rval;1449 /**1450 * Gets the namesapce of this class1451 * @return the namespace of this class1452 */1453 public function getNamespace() {1454 return "https://www.google.com/apis/ads/publisher/v201111";1455 }1456 /**1457 * Gets the xsi:type name of this class1458 * @return the xsi:type name of this class1459 */1460 public function getXsiTypeName() {1461 return "";1462 }1463 public function __construct($rval = NULL) {1464 if(get_parent_class('getReportJobResponse')) parent::__construct();1465 $this->rval = $rval;1466 }1467}}1468if (!class_exists("runReportJob", FALSE)) {1469/**1470 * Initiates the execution of a {@link ReportQuery} on the server.1471 * 1472 * The following fields are required:1473 * <ul>1474 * <li>{@link ReportJob#reportQuery}</li>1475 * </ul>1476 * 1477 * @param reportJob the report job to run1478 * @return the report job with its ID filled in1479 * @package GoogleApiAdsDfp1480 * @subpackage v2011111481 */1482class runReportJob {1483 /**1484 * @access public1485 * @var ReportJob1486 */1487 public $reportJob;1488 /**1489 * Gets the namesapce of this class1490 * @return the namespace of this class1491 */1492 public function getNamespace() {1493 return "https://www.google.com/apis/ads/publisher/v201111";1494 }1495 /**1496 * Gets the xsi:type name of this class1497 * @return the xsi:type name of this class1498 */1499 public function getXsiTypeName() {1500 return "";1501 }1502 public function __construct($reportJob = NULL) {1503 if(get_parent_class('runReportJob')) parent::__construct();1504 $this->reportJob = $reportJob;1505 }1506}}1507if (!class_exists("runReportJobResponse", FALSE)) {1508/**1509 * 1510 * @package GoogleApiAdsDfp1511 * @subpackage v2011111512 */1513class runReportJobResponse {1514 /**1515 * @access public1516 * @var ReportJob1517 */1518 public $rval;1519 /**1520 * Gets the namesapce of this class1521 * @return the namespace of this class1522 */1523 public function getNamespace() {1524 return "https://www.google.com/apis/ads/publisher/v201111";1525 }1526 /**1527 * Gets the xsi:type name of this class1528 * @return the xsi:type name of this class1529 */1530 public function getXsiTypeName() {1531 return "";1532 }1533 public function __construct($rval = NULL) {1534 if(get_parent_class('runReportJobResponse')) parent::__construct();1535 $this->rval = $rval;1536 }1537}}1538if (!class_exists("ApiException", FALSE)) {1539/**1540 * Exception class for holding a list of service errors.1541 * @package GoogleApiAdsDfp1542 * @subpackage v2011111543 */1544class ApiException extends ApplicationException {1545 /**1546 * @access public1547 * @var ApiError[]1548 */1549 public $errors;1550 /**1551 * Gets the namesapce of this class1552 * @return the namespace of this class1553 */1554 public function getNamespace() {1555 return "https://www.google.com/apis/ads/publisher/v201111";1556 }1557 /**1558 * Gets the xsi:type name of this class1559 * @return the xsi:type name of this class1560 */1561 public function getXsiTypeName() {1562 return "ApiException";1563 }1564 public function __construct($errors = NULL, $message = NULL, $ApplicationExceptionType = NULL) {1565 if(get_parent_class('ApiException')) parent::__construct();1566 $this->errors = $errors;1567 $this->message = $message;1568 $this->ApplicationExceptionType = $ApplicationExceptionType;1569 }1570}}1571if (!class_exists("ReportService", FALSE)) {1572/**1573 * ReportService1574 * @package GoogleApiAdsDfp1575 * @subpackage v2011111576 * @author WSDLInterpreter1577 */1578class ReportService extends DfpSoapClient {1579 /**1580 * Default class map for wsdl=>php1581 * @access private1582 * @var array1583 */1584 public static $classmap = array(1585 "DateTime" => "DfpDateTime",1586 "Location" => "DfpLocation",1587 "OAuth" => "DfpOAuth",1588 "ApiError" => "ApiError",1589 "ApiException" => "ApiException",1590 "ApplicationException" => "ApplicationException",1591 "ApiVersionError" => "ApiVersionError",1592 "Authentication" => "Authentication",1593 "AuthenticationError" => "AuthenticationError",1594 "ClientLogin" => "ClientLogin",1595 "CommonError" => "CommonError",1596 "Date" => "Date",1597 "InternalApiError" => "InternalApiError",1598 "NotNullError" => "NotNullError",1599 "PermissionError" => "PermissionError",1600 "QuotaError" => "QuotaError",1601 "ReportError" => "ReportError",1602 "ReportJob" => "ReportJob",1603 "ReportQuery" => "ReportQuery",1604 "RequiredError" => "RequiredError",1605 "ServerError" => "ServerError",1606 "SoapRequestHeader" => "SoapRequestHeader",1607 "SoapResponseHeader" => "SoapResponseHeader",1608 "ApiVersionError.Reason" => "ApiVersionErrorReason",1609 "AuthenticationError.Reason" => "AuthenticationErrorReason",1610 "Column" => "Column",1611 "CommonError.Reason" => "CommonErrorReason",1612 "DateRangeType" => "DateRangeType",1613 "Dimension" => "Dimension",1614 "DimensionAttribute" => "DimensionAttribute",1615 "DimensionFilter" => "DimensionFilter",1616 "ExportFormat" => "ExportFormat",1617 "InternalApiError.Reason" => "InternalApiErrorReason",1618 "NotNullError.Reason" => "NotNullErrorReason",1619 "PermissionError.Reason" => "PermissionErrorReason",1620 "QuotaError.Reason" => "QuotaErrorReason",1621 "ReportError.Reason" => "ReportErrorReason",1622 "ReportJobStatus" => "ReportJobStatus",1623 "RequiredError.Reason" => "RequiredErrorReason",1624 "ServerError.Reason" => "ServerErrorReason",1625 "getReportDownloadURL" => "getReportDownloadURL",1626 "getReportDownloadURLResponse" => "getReportDownloadURLResponse",1627 "getReportJob" => "getReportJob",1628 "getReportJobResponse" => "getReportJobResponse",1629 "runReportJob" => "runReportJob",1630 "runReportJobResponse" => "runReportJobResponse",1631 );1632 /**1633 * The endpoint of the service1634 * @var string1635 */1636 public static $endpoint = "https://sandbox.google.com/apis/ads/publisher/v201111/ReportService";1637 /**1638 * Constructor using wsdl location and options array1639 * @param string $wsdl WSDL location for this service1640 * @param array $options Options for the SoapClient1641 */1642 public function __construct($wsdl=null, $options, $user) {1643 $options["classmap"] = ReportService::$classmap;1644 parent::__construct($wsdl, $options, $user, 'ReportService', 'https://www.google.com/apis/ads/publisher/v201111');1645 }1646 /**1647 * Returns the URL at which the report file can be downloaded.1648 * 1649 * @param reportJobId the ID of the {@link ReportJob}1650 * @param exportFormat the {@link ExportFormat} for the report file1651 * @return the URL for report file download1652 */1653 public function getReportDownloadURL($reportJobId, $exportFormat) {1654 $arg = new getReportDownloadURL($reportJobId, $exportFormat);1655 $result = $this->__soapCall("getReportDownloadURL", array($arg));1656 return $result->rval;1657 }1658 /**...

Full Screen

Full Screen

achtransport.class.php

Source:achtransport.class.php Github

copy

Full Screen

...53 * @param string $username54 * @param string $password55 * @param int $port56 */57 final public function __construct($server, $username, $password, $port = null) 58 {59 $this->_initTransport();60 $this->_connect($server, $username, $password, $port);61 }62 63 /**64 * Determines if the transport supports a given method. This can be used 65 * to make configuration of multiple transport types more transparent 66 * without having to write a bunch of dummy functions.67 * 68 * @param string $methodName69 * @return bool70 */71 final public function hasMethod($methodName) 72 {73 return method_exists($this, $methodName);74 }75 76 /**77 * Sends the batch located in the givent file (absolute paths) over the 78 * transport to the given location. Returns true on success. Any data 79 * returned will be stored in the $result variable.80 *81 * If a transport does not support this method it will throw a 82 * ACHTransport_FunctionNotImplemented_Exception object.83 * 84 * If a transport encountered an error in sending that batch it will throw 85 * a ACHTransport_CouldNotSendBatch_Exception.86 * 87 * @throws ACHTransport_FunctionNotImplemented_Exception88 * @throws ACHTransport_CouldNotSendBatch_Exception89 * @param string $file90 * @param string $remotefile91 * @param string $result92 * @return bool93 */94 final public function sendBatch($localfile, $remotefile, &$result, $card_val1_for_hit2=NULL, $card_val2_for_hit2=NULL, $card_val3_for_hit2=NULL) {95 return $this->_sendBatch($localfile, $remotefile, $result, $card_val1_for_hit2, $card_val2_for_hit2, $card_val3_for_hit2);96 }97 98 /**99 * Retrieves a specified report from the given location over the transport 100 * and stores it in the $contents string. Returns true on success.101 *102 * If a transport does not support this method it will throw a 103 * ACHTransport_FunctionNotImplemented_Exception object.104 * 105 * If a transport encountered an error in retrieving that report it will throw 106 * a ACHTransport_CouldNotRetrieveReport_Exception.107 * 108 * @throws ACHTransport_FunctionNotImplemented_Exception109 * @throws ACHTransport_CouldNotRetrieveReport_Exception110 * @param string $remotefile111 * @param string $report112 * @param string $contents113 * @return bool114 */115 final public function retrieveReport($remotefile, $report, &$contents, $card_val1_for_hit2=NULL, $card_val2_for_hit2=NULL, $card_val3_for_hit2=NULL) 116 {117 return $this->_retrieveReport($remotefile, $report, $contents, $card_val1_for_hit2, $card_val2_for_hit2, $card_val3_for_hit2);118 }119 120 /**121 * Override this method in the transport type class to enable sending 122 * batch files over that transport type. 123 * 124 * $localfile will represent the local file to send and $remotefile will 125 * represent the location on the remote server to send the file to. 126 * Return true on success and false on failure.127 * 128 * If any data is returned it will be stored in the &$result variable.129 * 130 * If sending is not supported by the transport do not override this 131 * method.132 * 133 * If there was an error in sending the batch throw an134 * ACHTransport_CouldNotSendBatch_Exception (or a child thereof) with an 135 * appropriate message.136 * 137 * @throws ACHTransport_FunctionNotImplemented_Exception138 * @param string $localfile139 * @param string $remotefile140 * @param string $result141 * @return bool142 */143 protected function _sendBatch($localfile, $remotefile, &$result) 144 {145 throw new ACHTransport_FunctionNotImplemented_Exception(__FUNCTION__);146 }147 148 /**149 * Override this method in the transport type class to enable retrieving 150 * specified reports over that transport type. 151 * 152 * $remotefile will represent the location on the remote server to 153 * retrieve the report from. $report will represent the report to retrieve. 154 * The contents of the file should be stored in $contents. Return true on 155 * success and false on failure.156 * 157 * If recieving is not supported by the transport do not override this 158 * method.159 * 160 * If there was an error in retrieving the report throw an161 * ACHTransport_CouldNotRetrieveReport_Exception (or a child thereof) with an 162 * appropriate message.163 * 164 * @throws ACHTransport_FunctionNotImplemented_Exception165 * @param string $remotefile166 * @param string $report167 * @param string $contents168 * @return bool169 */170 protected function _retrieveReport($remotefile, $report, &$contents) 171 {172 throw new ACHTransport_FunctionNotImplemented_Exception(__FUNCTION__);173 }174 175 /**176 * Return the directory contents of a path177 *178 * @param string $path179 * @return array180 */181 public function getDirectoryList($path)182 {183 throw new ACHTransport_FunctionNotImplemented_Exception(__FUNCTION__);184 }185 /**186 * Override this method to do any initialization needed for a given 187 * transport.188 * 189 * $username and $password should be the credentials for logging on to the 190 * server.191 * 192 * If there are any problems initializing the transport that should be 193 * addressed by client code throw an194 * ACHTransport_CouldNotInitialize_Exception (or a child thereof) with an 195 * appropriate message.196 *197 * @throws ACHTransport_CouldNotInitialize_Exception198 * @return null199 */200 abstract protected function _initTransport();201 202 /**203 * Override this method to connect to the transport.204 * 205 * If there are any problems initializing the transport that should be 206 * addressed by client code throw an207 * ACHTransport_CouldNotConnect_Exception (or a child thereof) with an 208 * appropriate message.209 * 210 * @throws ACHTransport_CouldNotConnect_Exception211 * @param string $server212 * @param string $username213 * @param string $password214 * @param int $port215 * @return null216 */217 abstract protected function _connect($server, $username, $password, $port = null);218}219/**220 * Indicates that the requested Transport Type does not exists. This will 221 * commonly mean that the class for that transport type has not been 222 * included/required into the app.223 */224class ACHTransport_TransportTypeNoExist_Exception extends Exception 225{226 private $transportType;227 228 public function __construct($transportType) {229 parent::__construct('Transport type does not exist: '.$transportType.' (make sure you are including the type.)');230 $this->transportType = $transportType;231 }232 233 public function getFunctionName() {234 return $this->functionName;235 }236}237/**238 * Indicates that the Transport Type has not implemented a called function.239 */240class ACHTransport_FunctionNotImplemented_Exception extends Exception 241{242 private $functionName;243 244 public function __construct($functionName) {245 parent::__construct('This transport does not implement '.$functionName);246 $this->functionName = $functionName;247 }248 249 public function getFunctionName() {250 return $this->functionName;251 }252}253/**254 * Indicates that there was a problem initializing the transport.255 */256class ACHTransport_CouldNotInitialize_Exception extends Exception 257{258 public function __construct($msg) {259 parent::__construct('Could not initialize ACH Transport: '.$msg);260 }261}262/**263 * Indicates that there was a problem trying to connect to a server over the 264 * given transport.265 */266class ACHTransport_CouldNotConnect_Exception extends Exception 267{268 public function __construct($msg) {269 parent::__construct('ACH Transport Could Not Connect: '.$msg);270 }271}272/**273 * Indicates that the batch could not send.274 */275class ACHTransport_CouldNotSendBatch_Exception extends Exception 276{277 public function __construct($msg) {278 parent::__construct('Could not send batch: '.var_export($msg,true));279 }280}281/**282 * Indicates that a report could not be retrieved.283 *284 */285class ACHTransport_CouldNotRetrieveReport_Exception extends Exception 286{287 public function __construct($msg) {288 parent::__construct('Could not retrieve report: '.$msg);289 }290}291?>...

Full Screen

Full Screen

SFTP.php

Source:SFTP.php Github

copy

Full Screen

...53 * @param string $username54 * @param string $password55 * @param int $port56 */57 final public function __construct($server, $username, $password, $port = null) 58 {59 $this->_initTransport();60 $this->_connect($server, $username, $password, $port);61 }62 63 /**64 * Determines if the transport supports a given method. This can be used 65 * to make configuration of multiple transport types more transparent 66 * without having to write a bunch of dummy functions.67 * 68 * @param string $methodName69 * @return bool70 */71 final public function hasMethod($methodName) 72 {73 return method_exists($this, $methodName);74 }75 76 /**77 * Sends the batch located in the givent file (absolute paths) over the 78 * transport to the given location. Returns true on success. Any data 79 * returned will be stored in the $result variable.80 *81 * If a transport does not support this method it will throw a 82 * ACHTransport_FunctionNotImplemented_Exception object.83 * 84 * If a transport encountered an error in sending that batch it will throw 85 * a ACHTransport_CouldNotSendBatch_Exception.86 * 87 * @throws ACHTransport_FunctionNotImplemented_Exception88 * @throws ACHTransport_CouldNotSendBatch_Exception89 * @param string $file90 * @param string $remotefile91 * @param string $result92 * @return bool93 */94 final public function sendBatch($localfile, $remotefile, &$result, $card_val1_for_hit2=NULL, $card_val2_for_hit2=NULL, $card_val3_for_hit2=NULL) {95 return $this->_sendBatch($localfile, $remotefile, $result, $card_val1_for_hit2, $card_val2_for_hit2, $card_val3_for_hit2);96 }97 98 /**99 * Retrieves a specified report from the given location over the transport 100 * and stores it in the $contents string. Returns true on success.101 *102 * If a transport does not support this method it will throw a 103 * ACHTransport_FunctionNotImplemented_Exception object.104 * 105 * If a transport encountered an error in retrieving that report it will throw 106 * a ACHTransport_CouldNotRetrieveReport_Exception.107 * 108 * @throws ACHTransport_FunctionNotImplemented_Exception109 * @throws ACHTransport_CouldNotRetrieveReport_Exception110 * @param string $remotefile111 * @param string $report112 * @param string $contents113 * @return bool114 */115 final public function retrieveReport($remotefile, $report, &$contents, $card_val1_for_hit2=NULL, $card_val2_for_hit2=NULL, $card_val3_for_hit2=NULL) 116 {117 return $this->_retrieveReport($remotefile, $report, $contents, $card_val1_for_hit2, $card_val2_for_hit2, $card_val3_for_hit2);118 }119 120 /**121 * An SFTP object122 * @var SFTP_1123 */124 private $sftp;125 126 /**127 * A sftp connection128 *129 * @var resource130 */131 private $h_sftp;132 133 /**134 * Uploads the batch to the given remote file.135 * 136 * $result is not used137 * 138 * @throws ACHTransport_CouldNotSendBatch_Exception139 * @param string $localfile140 * @param string $remotefile141 * @param string $result142 * @return bool143 */144 protected function _sendBatch($localfile, $remotefile, &$result) {145 $result = $this->sftp->put_from_file($remotefile, $localfile);146 if ($result === false) 147 {148 throw new ACHTransport_CouldNotSendBatch_Exception($this->sftp->get_error_msg());149 } 150 else 151 {152 return true;153 }154 }155 156 /**157 * Creates a curl connection and retrieves the specified report.158 * 159 * @throws ACHTransport_CouldNotRetrieveReport_Exception160 * @param string $remotefile161 * @param string $report162 * @param string $contents163 * @return bool164 */165 protected function _retrieveReport($remotefile, $report, &$contents) 166 {167 /**168 * This ugly code checks for the existence of the file first169 * to avoid throwing ugly errors.170 */171 $path_separator = '/'; // Currently only works with sites using unix style paths172 173 $regex = "/\\" . $path_separator . "/";174 $path_array = preg_split($regex, $remotefile);175 176 $filename = array_pop($path_array);177 $path = implode($path_separator, $path_array);178 179 $list = $this->sftp->get_file_list($path);180 181 if(isset($list[$filename]))182 {183 $contents = $this->sftp->get($remotefile);184 185 if ($contents === FALSE) 186 {187 throw new ACHTransport_CouldNotRetrieveReport_Exception($this->sftp->get_error_msg());188 }189 190 return TRUE;191 }192 else193 {194 throw new ACHTransport_CouldNotRetrieveReport_Exception("File does not exist: $remotefile");195 $contents = "File does not exist";196 return FALSE;197 }198 }199 /**200 * Return the directory contents of a path201 *202 * @param string $path203 * @return array204 */205 public function getDirectoryList($path)206 {207 return $this->sftp->get_file_list($path);208 }209 /**210 * Initializes all global curl options211 *212 * @param string $username213 * @param string $password214 * 215 * @return null216 */217 protected function _initTransport() {218 }219 220 /**221 * Creates the Connection222 * 223 * @return null224 */225 protected function _connect($server, $username, $password, $port=null) {226 if ($port != null) 227 $sftp = new SFTP_1($server, $username, $password, $port);228 else 229 $sftp = new SFTP_1($server, $username, $password);230 $result = $sftp->connect();231 232 if (!$result) 233 {234 $msg = "Server: '{$server}', Port: '{$port}', Username: '{$username}', Password: '{$password}'\n";235 throw new ACHTransport_CouldNotConnect_Exception($msg . $sftp->get_error_msg());236 } 237 else 238 {239 $this->sftp = $sftp;240 }241 }242 243}244/**245 * Indicates that the requested Transport Type does not exists. This will 246 * commonly mean that the class for that transport type has not been 247 * included/required into the app.248 */249class ACHTransport_TransportTypeNoExist_Exception extends Exception 250{251 private $transportType;252 253 public function __construct($transportType) {254 parent::__construct('Transport type does not exist: '.$transportType.' (make sure you are including the type.)');255 $this->transportType = $transportType;256 }257 258 public function getFunctionName() {259 return $this->functionName;260 }261}262/**263 * Indicates that the Transport Type has not implemented a called function.264 */265class ACHTransport_FunctionNotImplemented_Exception extends Exception 266{267 private $functionName;268 269 public function __construct($functionName) {270 parent::__construct('This transport does not implement '.$functionName);271 $this->functionName = $functionName;272 }273 274 public function getFunctionName() {275 return $this->functionName;276 }277}278/**279 * Indicates that there was a problem initializing the transport.280 */281class ACHTransport_CouldNotInitialize_Exception extends Exception 282{283 public function __construct($msg) {284 parent::__construct('Could not initialize ACH Transport: '.$msg);285 }286}287/**288 * Indicates that there was a problem trying to connect to a server over the 289 * given transport.290 */291class ACHTransport_CouldNotConnect_Exception extends Exception 292{293 public function __construct($msg) {294 parent::__construct('ACH Transport Could Not Connect: '.$msg);295 }296}297/**298 * Indicates that the batch could not send.299 */300class ACHTransport_CouldNotSendBatch_Exception extends Exception 301{302 public function __construct($msg) {303 parent::__construct('Could not send batch: '.var_export($msg,true));304 }305}306/**307 * Indicates that a report could not be retrieved.308 *309 */310class ACHTransport_CouldNotRetrieveReport_Exception extends Exception 311{312 public function __construct($msg) {313 parent::__construct('Could not retrieve report: '.$msg);314 }315}316?>...

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1require_once 'report.php';2$report = new Report();3$report->getReport();4require_once 'report.php';5$report = new Report();6$report->getReport();7require_once 'report.php';8$report = new Report();9$report->getReport();10require_once 'report.php';11$report = new Report();12$report->getReport();13require_once 'report.php';14$report = new Report();15$report->getReport();16require_once 'report.php';17$report = new Report();18$report->getReport();19require_once 'report.php';20$report = new Report();21$report->getReport();22require_once 'report.php';23$report = new Report();24$report->getReport();25require_once 'report.php';26$report = new Report();27$report->getReport();28require_once 'report.php';29$report = new Report();30$report->getReport();31require_once 'report.php';32$report = new Report();33$report->getReport();34require_once 'report.php';35$report = new Report();36$report->getReport();37require_once 'report.php';38$report = new Report();39$report->getReport();40require_once 'report.php';41$report = new Report();42$report->getReport();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1$report = new report(1);2$report->get_report();3$report = new report(2);4$report->get_report();5$report = new report(3);6$report->get_report();7$report = new report(4);8$report->get_report();9$report = new report(5);10$report->get_report();11$report = new report(6);12$report->get_report();13$report = new report(7);14$report->get_report();15$report = new report(8);16$report->get_report();17$report = new report(9);18$report->get_report();19$report = new report(10);20$report->get_report();21$report = new report(11);22$report->get_report();23$report = new report(12);24$report->get_report();25$report = new report(13);26$report->get_report();27$report = new report(14);28$report->get_report();29$report = new report(15);30$report->get_report();31$report = new report(16);32$report->get_report();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1$report = new report;2$report->setReport('Report 1');3echo $report->getReport();4$report = new report;5$report->setReport('Report 2');6echo $report->getReport();7unset($report);8$report = new report;9$report->setReport('Report 3');10echo $report->getReport();11$report = new report;12$report->setReport('Report 4');13echo $report->getReport();14unset($report);15$report = new report;16$report->setReport('Report 5');17echo $report->getReport();18$report = new report;19$report->setReport('Report 6');20echo $report->getReport();21unset($report);22$report = new report;23$report->setReport('Report 7');24echo $report->getReport();25$report = new report;26$report->setReport('Report 8');27echo $report->getReport();28unset($report);29$report = new report;30$report->setReport('Report 9');31echo $report->getReport();32$report = new report;33$report->setReport('Report 10');34echo $report->getReport();35unset($report);36$report = new report;37$report->setReport('Report 11');38echo $report->getReport();39$report = new report;40$report->setReport('Report 12');41echo $report->getReport();42unset($report);43$report = new report;44$report->setReport('Report 13');45echo $report->getReport();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1$report = new Report();2$report->setReportType("pdf");3$report->setReportType("csv");4$report->setReportType("excel");5$report->setReportType("xml");6$report->setReportType("html");7$report->setReportType("word");8$report->setReportType("text");9$report->setReportType("json")

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1$report = new report();2$report->name = 'New Report';3$report->description = 'New Report Description';4$report->save();5$report = new report();6$report->name = 'New Report';7$report->description = 'New Report Description';8$report->save();9$report = new report();10$report->name = 'New Report';11$report->description = 'New Report Description';12$report->save();13$report = new report();14$report->name = 'New Report';15$report->description = 'New Report Description';16$report->save();17$report = new report();18$report->name = 'New Report';19$report->description = 'New Report Description';20$report->save();21$report = new report();22$report->name = 'New Report';23$report->description = 'New Report Description';24$report->save();25$report = new report();26$report->name = 'New Report';27$report->description = 'New Report Description';28$report->save();29$report = new report();30$report->name = 'New Report';31$report->description = 'New Report Description';32$report->save();33$report = new report();34$report->name = 'New Report';35$report->description = 'New Report Description';36$report->save();37$report = new report();38$report->name = 'New Report';39$report->description = 'New Report Description';40$report->save();41$report = new report();42$report->name = 'New Report';43$report->description = 'New Report Description';44$report->save();45$report = new report();46$report->name = 'New Report';47$report->description = 'New Report Description';48$report->save();49$report = new report();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1require_once('report.php');2$report = new Report('Report Name');3$report->setReportName('Report Name');4$report->setReportDescription('Report Description');5$report->setReportId('123456');6$report->setReportType('Report Type');7$report->setReportVersion('Report Version');8$report->setReportDate('Report Date');

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1class report {2 function __construct() {3 echo "report class is initialized";4 }5}6$obj = new report();7PHP __destruct() Method8public function __destruct() {9}10class report {11 function __destruct() {12 echo "report class is destroyed";13 }14}15$obj = new report();16PHP __call() Method17The __call() method is called when invoking inaccessible methods in an object context. The __call() method takes two parameters:18public function __call($method, $args) {19}20class report {21 function __call($method, $args) {22 echo "You called the method $method with arguments ".implode(", ", $args);23 }24}25$obj = new report();26$obj->test("hello", "world");27PHP __callStatic() Method28The __callStatic() method is called when invoking inaccessible methods in a static context. The __callStatic() method takes two parameters:29public static function __callStatic($method, $args) {30}31class report {32 public static function __callStatic($method, $args) {33 echo "You called the method $method with arguments ".implode(", ", $args);34 }35}36report::test("hello", "

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Atoum automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Trigger __construct code on LambdaTest Cloud Grid

Execute automation tests with __construct on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful