` on every field that you wanted to import - you can just override the second argument given to `ContentToFieldMaper->mapContentToFields()` like so: 66 | 67 | ``` 68 | $map = [ 69 | 'Page Title' => 'title', 70 | 'Heading' => 'h1', 71 | 'Main Content' => 'div#main', 72 | 'Call to Action' => 'p.call-to-action' 73 | ]; 74 | 75 | $contentToFieldMapper->mapToFields($html, $map); 76 | ``` 77 | 78 | ## Running tests 79 | 80 | To run the phpspec test suite run 81 | 82 | ```bash 83 | $ vendor/bin/phpspec run 84 | ``` 85 | 86 | -------------------------------------------------------------------------------- /04-import-from-sitemap/bin/scrape: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | run(); 7 | -------------------------------------------------------------------------------- /04-import-from-sitemap/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-4": { 4 | "": "src" 5 | } 6 | }, 7 | "require-dev": { 8 | "phpspec/phpspec": "^2.5" 9 | }, 10 | "require": { 11 | "symfony/dom-crawler": "^3.1", 12 | "symfony/css-selector": "^3.1", 13 | "symfony/console": "^3.1", 14 | "guzzlehttp/guzzle": "^6.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /04-import-from-sitemap/composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "a741fab124069a5f11af55e52ff19bec", 8 | "content-hash": "bbd4a8dd13f0ba397248c9cb2a2c1df7", 9 | "packages": [ 10 | { 11 | "name": "guzzlehttp/guzzle", 12 | "version": "6.2.0", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/guzzle/guzzle.git", 16 | "reference": "d094e337976dff9d8e2424e8485872194e768662" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", 21 | "reference": "d094e337976dff9d8e2424e8485872194e768662", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "guzzlehttp/promises": "~1.0", 26 | "guzzlehttp/psr7": "~1.1", 27 | "php": ">=5.5.0" 28 | }, 29 | "require-dev": { 30 | "ext-curl": "*", 31 | "phpunit/phpunit": "~4.0", 32 | "psr/log": "~1.0" 33 | }, 34 | "type": "library", 35 | "extra": { 36 | "branch-alias": { 37 | "dev-master": "6.2-dev" 38 | } 39 | }, 40 | "autoload": { 41 | "files": [ 42 | "src/functions_include.php" 43 | ], 44 | "psr-4": { 45 | "GuzzleHttp\\": "src/" 46 | } 47 | }, 48 | "notification-url": "https://packagist.org/downloads/", 49 | "license": [ 50 | "MIT" 51 | ], 52 | "authors": [ 53 | { 54 | "name": "Michael Dowling", 55 | "email": "mtdowling@gmail.com", 56 | "homepage": "https://github.com/mtdowling" 57 | } 58 | ], 59 | "description": "Guzzle is a PHP HTTP client library", 60 | "homepage": "http://guzzlephp.org/", 61 | "keywords": [ 62 | "client", 63 | "curl", 64 | "framework", 65 | "http", 66 | "http client", 67 | "rest", 68 | "web service" 69 | ], 70 | "time": "2016-03-21 20:02:09" 71 | }, 72 | { 73 | "name": "guzzlehttp/promises", 74 | "version": "1.2.0", 75 | "source": { 76 | "type": "git", 77 | "url": "https://github.com/guzzle/promises.git", 78 | "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" 79 | }, 80 | "dist": { 81 | "type": "zip", 82 | "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", 83 | "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", 84 | "shasum": "" 85 | }, 86 | "require": { 87 | "php": ">=5.5.0" 88 | }, 89 | "require-dev": { 90 | "phpunit/phpunit": "~4.0" 91 | }, 92 | "type": "library", 93 | "extra": { 94 | "branch-alias": { 95 | "dev-master": "1.0-dev" 96 | } 97 | }, 98 | "autoload": { 99 | "psr-4": { 100 | "GuzzleHttp\\Promise\\": "src/" 101 | }, 102 | "files": [ 103 | "src/functions_include.php" 104 | ] 105 | }, 106 | "notification-url": "https://packagist.org/downloads/", 107 | "license": [ 108 | "MIT" 109 | ], 110 | "authors": [ 111 | { 112 | "name": "Michael Dowling", 113 | "email": "mtdowling@gmail.com", 114 | "homepage": "https://github.com/mtdowling" 115 | } 116 | ], 117 | "description": "Guzzle promises library", 118 | "keywords": [ 119 | "promise" 120 | ], 121 | "time": "2016-05-18 16:56:05" 122 | }, 123 | { 124 | "name": "guzzlehttp/psr7", 125 | "version": "1.3.1", 126 | "source": { 127 | "type": "git", 128 | "url": "https://github.com/guzzle/psr7.git", 129 | "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" 130 | }, 131 | "dist": { 132 | "type": "zip", 133 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", 134 | "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", 135 | "shasum": "" 136 | }, 137 | "require": { 138 | "php": ">=5.4.0", 139 | "psr/http-message": "~1.0" 140 | }, 141 | "provide": { 142 | "psr/http-message-implementation": "1.0" 143 | }, 144 | "require-dev": { 145 | "phpunit/phpunit": "~4.0" 146 | }, 147 | "type": "library", 148 | "extra": { 149 | "branch-alias": { 150 | "dev-master": "1.4-dev" 151 | } 152 | }, 153 | "autoload": { 154 | "psr-4": { 155 | "GuzzleHttp\\Psr7\\": "src/" 156 | }, 157 | "files": [ 158 | "src/functions_include.php" 159 | ] 160 | }, 161 | "notification-url": "https://packagist.org/downloads/", 162 | "license": [ 163 | "MIT" 164 | ], 165 | "authors": [ 166 | { 167 | "name": "Michael Dowling", 168 | "email": "mtdowling@gmail.com", 169 | "homepage": "https://github.com/mtdowling" 170 | } 171 | ], 172 | "description": "PSR-7 message implementation", 173 | "keywords": [ 174 | "http", 175 | "message", 176 | "stream", 177 | "uri" 178 | ], 179 | "time": "2016-06-24 23:00:38" 180 | }, 181 | { 182 | "name": "psr/http-message", 183 | "version": "1.0", 184 | "source": { 185 | "type": "git", 186 | "url": "https://github.com/php-fig/http-message.git", 187 | "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" 188 | }, 189 | "dist": { 190 | "type": "zip", 191 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", 192 | "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", 193 | "shasum": "" 194 | }, 195 | "require": { 196 | "php": ">=5.3.0" 197 | }, 198 | "type": "library", 199 | "extra": { 200 | "branch-alias": { 201 | "dev-master": "1.0.x-dev" 202 | } 203 | }, 204 | "autoload": { 205 | "psr-4": { 206 | "Psr\\Http\\Message\\": "src/" 207 | } 208 | }, 209 | "notification-url": "https://packagist.org/downloads/", 210 | "license": [ 211 | "MIT" 212 | ], 213 | "authors": [ 214 | { 215 | "name": "PHP-FIG", 216 | "homepage": "http://www.php-fig.org/" 217 | } 218 | ], 219 | "description": "Common interface for HTTP messages", 220 | "keywords": [ 221 | "http", 222 | "http-message", 223 | "psr", 224 | "psr-7", 225 | "request", 226 | "response" 227 | ], 228 | "time": "2015-05-04 20:22:00" 229 | }, 230 | { 231 | "name": "symfony/console", 232 | "version": "v3.1.2", 233 | "source": { 234 | "type": "git", 235 | "url": "https://github.com/symfony/console.git", 236 | "reference": "747154aa69b0f83cd02fc9aa554836dee417631a" 237 | }, 238 | "dist": { 239 | "type": "zip", 240 | "url": "https://api.github.com/repos/symfony/console/zipball/747154aa69b0f83cd02fc9aa554836dee417631a", 241 | "reference": "747154aa69b0f83cd02fc9aa554836dee417631a", 242 | "shasum": "" 243 | }, 244 | "require": { 245 | "php": ">=5.5.9", 246 | "symfony/polyfill-mbstring": "~1.0" 247 | }, 248 | "require-dev": { 249 | "psr/log": "~1.0", 250 | "symfony/event-dispatcher": "~2.8|~3.0", 251 | "symfony/process": "~2.8|~3.0" 252 | }, 253 | "suggest": { 254 | "psr/log": "For using the console logger", 255 | "symfony/event-dispatcher": "", 256 | "symfony/process": "" 257 | }, 258 | "type": "library", 259 | "extra": { 260 | "branch-alias": { 261 | "dev-master": "3.1-dev" 262 | } 263 | }, 264 | "autoload": { 265 | "psr-4": { 266 | "Symfony\\Component\\Console\\": "" 267 | }, 268 | "exclude-from-classmap": [ 269 | "/Tests/" 270 | ] 271 | }, 272 | "notification-url": "https://packagist.org/downloads/", 273 | "license": [ 274 | "MIT" 275 | ], 276 | "authors": [ 277 | { 278 | "name": "Fabien Potencier", 279 | "email": "fabien@symfony.com" 280 | }, 281 | { 282 | "name": "Symfony Community", 283 | "homepage": "https://symfony.com/contributors" 284 | } 285 | ], 286 | "description": "Symfony Console Component", 287 | "homepage": "https://symfony.com", 288 | "time": "2016-06-29 07:02:31" 289 | }, 290 | { 291 | "name": "symfony/css-selector", 292 | "version": "v3.1.2", 293 | "source": { 294 | "type": "git", 295 | "url": "https://github.com/symfony/css-selector.git", 296 | "reference": "2851e1932d77ce727776154d659b232d061e816a" 297 | }, 298 | "dist": { 299 | "type": "zip", 300 | "url": "https://api.github.com/repos/symfony/css-selector/zipball/2851e1932d77ce727776154d659b232d061e816a", 301 | "reference": "2851e1932d77ce727776154d659b232d061e816a", 302 | "shasum": "" 303 | }, 304 | "require": { 305 | "php": ">=5.5.9" 306 | }, 307 | "type": "library", 308 | "extra": { 309 | "branch-alias": { 310 | "dev-master": "3.1-dev" 311 | } 312 | }, 313 | "autoload": { 314 | "psr-4": { 315 | "Symfony\\Component\\CssSelector\\": "" 316 | }, 317 | "exclude-from-classmap": [ 318 | "/Tests/" 319 | ] 320 | }, 321 | "notification-url": "https://packagist.org/downloads/", 322 | "license": [ 323 | "MIT" 324 | ], 325 | "authors": [ 326 | { 327 | "name": "Jean-François Simon", 328 | "email": "jeanfrancois.simon@sensiolabs.com" 329 | }, 330 | { 331 | "name": "Fabien Potencier", 332 | "email": "fabien@symfony.com" 333 | }, 334 | { 335 | "name": "Symfony Community", 336 | "homepage": "https://symfony.com/contributors" 337 | } 338 | ], 339 | "description": "Symfony CssSelector Component", 340 | "homepage": "https://symfony.com", 341 | "time": "2016-06-29 05:41:56" 342 | }, 343 | { 344 | "name": "symfony/dom-crawler", 345 | "version": "v3.1.2", 346 | "source": { 347 | "type": "git", 348 | "url": "https://github.com/symfony/dom-crawler.git", 349 | "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0" 350 | }, 351 | "dist": { 352 | "type": "zip", 353 | "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0", 354 | "reference": "99ec4a23330fcd0c8667095f3ef7aa204ffd9dc0", 355 | "shasum": "" 356 | }, 357 | "require": { 358 | "php": ">=5.5.9", 359 | "symfony/polyfill-mbstring": "~1.0" 360 | }, 361 | "require-dev": { 362 | "symfony/css-selector": "~2.8|~3.0" 363 | }, 364 | "suggest": { 365 | "symfony/css-selector": "" 366 | }, 367 | "type": "library", 368 | "extra": { 369 | "branch-alias": { 370 | "dev-master": "3.1-dev" 371 | } 372 | }, 373 | "autoload": { 374 | "psr-4": { 375 | "Symfony\\Component\\DomCrawler\\": "" 376 | }, 377 | "exclude-from-classmap": [ 378 | "/Tests/" 379 | ] 380 | }, 381 | "notification-url": "https://packagist.org/downloads/", 382 | "license": [ 383 | "MIT" 384 | ], 385 | "authors": [ 386 | { 387 | "name": "Fabien Potencier", 388 | "email": "fabien@symfony.com" 389 | }, 390 | { 391 | "name": "Symfony Community", 392 | "homepage": "https://symfony.com/contributors" 393 | } 394 | ], 395 | "description": "Symfony DomCrawler Component", 396 | "homepage": "https://symfony.com", 397 | "time": "2016-06-29 05:41:56" 398 | }, 399 | { 400 | "name": "symfony/polyfill-mbstring", 401 | "version": "v1.2.0", 402 | "source": { 403 | "type": "git", 404 | "url": "https://github.com/symfony/polyfill-mbstring.git", 405 | "reference": "dff51f72b0706335131b00a7f49606168c582594" 406 | }, 407 | "dist": { 408 | "type": "zip", 409 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", 410 | "reference": "dff51f72b0706335131b00a7f49606168c582594", 411 | "shasum": "" 412 | }, 413 | "require": { 414 | "php": ">=5.3.3" 415 | }, 416 | "suggest": { 417 | "ext-mbstring": "For best performance" 418 | }, 419 | "type": "library", 420 | "extra": { 421 | "branch-alias": { 422 | "dev-master": "1.2-dev" 423 | } 424 | }, 425 | "autoload": { 426 | "psr-4": { 427 | "Symfony\\Polyfill\\Mbstring\\": "" 428 | }, 429 | "files": [ 430 | "bootstrap.php" 431 | ] 432 | }, 433 | "notification-url": "https://packagist.org/downloads/", 434 | "license": [ 435 | "MIT" 436 | ], 437 | "authors": [ 438 | { 439 | "name": "Nicolas Grekas", 440 | "email": "p@tchwork.com" 441 | }, 442 | { 443 | "name": "Symfony Community", 444 | "homepage": "https://symfony.com/contributors" 445 | } 446 | ], 447 | "description": "Symfony polyfill for the Mbstring extension", 448 | "homepage": "https://symfony.com", 449 | "keywords": [ 450 | "compatibility", 451 | "mbstring", 452 | "polyfill", 453 | "portable", 454 | "shim" 455 | ], 456 | "time": "2016-05-18 14:26:46" 457 | } 458 | ], 459 | "packages-dev": [ 460 | { 461 | "name": "doctrine/instantiator", 462 | "version": "1.0.5", 463 | "source": { 464 | "type": "git", 465 | "url": "https://github.com/doctrine/instantiator.git", 466 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" 467 | }, 468 | "dist": { 469 | "type": "zip", 470 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", 471 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", 472 | "shasum": "" 473 | }, 474 | "require": { 475 | "php": ">=5.3,<8.0-DEV" 476 | }, 477 | "require-dev": { 478 | "athletic/athletic": "~0.1.8", 479 | "ext-pdo": "*", 480 | "ext-phar": "*", 481 | "phpunit/phpunit": "~4.0", 482 | "squizlabs/php_codesniffer": "~2.0" 483 | }, 484 | "type": "library", 485 | "extra": { 486 | "branch-alias": { 487 | "dev-master": "1.0.x-dev" 488 | } 489 | }, 490 | "autoload": { 491 | "psr-4": { 492 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 493 | } 494 | }, 495 | "notification-url": "https://packagist.org/downloads/", 496 | "license": [ 497 | "MIT" 498 | ], 499 | "authors": [ 500 | { 501 | "name": "Marco Pivetta", 502 | "email": "ocramius@gmail.com", 503 | "homepage": "http://ocramius.github.com/" 504 | } 505 | ], 506 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 507 | "homepage": "https://github.com/doctrine/instantiator", 508 | "keywords": [ 509 | "constructor", 510 | "instantiate" 511 | ], 512 | "time": "2015-06-14 21:17:01" 513 | }, 514 | { 515 | "name": "phpdocumentor/reflection-common", 516 | "version": "1.0", 517 | "source": { 518 | "type": "git", 519 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 520 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" 521 | }, 522 | "dist": { 523 | "type": "zip", 524 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", 525 | "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", 526 | "shasum": "" 527 | }, 528 | "require": { 529 | "php": ">=5.5" 530 | }, 531 | "require-dev": { 532 | "phpunit/phpunit": "^4.6" 533 | }, 534 | "type": "library", 535 | "extra": { 536 | "branch-alias": { 537 | "dev-master": "1.0.x-dev" 538 | } 539 | }, 540 | "autoload": { 541 | "psr-4": { 542 | "phpDocumentor\\Reflection\\": [ 543 | "src" 544 | ] 545 | } 546 | }, 547 | "notification-url": "https://packagist.org/downloads/", 548 | "license": [ 549 | "MIT" 550 | ], 551 | "authors": [ 552 | { 553 | "name": "Jaap van Otterdijk", 554 | "email": "opensource@ijaap.nl" 555 | } 556 | ], 557 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 558 | "homepage": "http://www.phpdoc.org", 559 | "keywords": [ 560 | "FQSEN", 561 | "phpDocumentor", 562 | "phpdoc", 563 | "reflection", 564 | "static analysis" 565 | ], 566 | "time": "2015-12-27 11:43:31" 567 | }, 568 | { 569 | "name": "phpdocumentor/reflection-docblock", 570 | "version": "3.1.0", 571 | "source": { 572 | "type": "git", 573 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 574 | "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" 575 | }, 576 | "dist": { 577 | "type": "zip", 578 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", 579 | "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", 580 | "shasum": "" 581 | }, 582 | "require": { 583 | "php": ">=5.5", 584 | "phpdocumentor/reflection-common": "^1.0@dev", 585 | "phpdocumentor/type-resolver": "^0.2.0", 586 | "webmozart/assert": "^1.0" 587 | }, 588 | "require-dev": { 589 | "mockery/mockery": "^0.9.4", 590 | "phpunit/phpunit": "^4.4" 591 | }, 592 | "type": "library", 593 | "autoload": { 594 | "psr-4": { 595 | "phpDocumentor\\Reflection\\": [ 596 | "src/" 597 | ] 598 | } 599 | }, 600 | "notification-url": "https://packagist.org/downloads/", 601 | "license": [ 602 | "MIT" 603 | ], 604 | "authors": [ 605 | { 606 | "name": "Mike van Riel", 607 | "email": "me@mikevanriel.com" 608 | } 609 | ], 610 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 611 | "time": "2016-06-10 09:48:41" 612 | }, 613 | { 614 | "name": "phpdocumentor/type-resolver", 615 | "version": "0.2", 616 | "source": { 617 | "type": "git", 618 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 619 | "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" 620 | }, 621 | "dist": { 622 | "type": "zip", 623 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", 624 | "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", 625 | "shasum": "" 626 | }, 627 | "require": { 628 | "php": ">=5.5", 629 | "phpdocumentor/reflection-common": "^1.0" 630 | }, 631 | "require-dev": { 632 | "mockery/mockery": "^0.9.4", 633 | "phpunit/phpunit": "^5.2||^4.8.24" 634 | }, 635 | "type": "library", 636 | "extra": { 637 | "branch-alias": { 638 | "dev-master": "1.0.x-dev" 639 | } 640 | }, 641 | "autoload": { 642 | "psr-4": { 643 | "phpDocumentor\\Reflection\\": [ 644 | "src/" 645 | ] 646 | } 647 | }, 648 | "notification-url": "https://packagist.org/downloads/", 649 | "license": [ 650 | "MIT" 651 | ], 652 | "authors": [ 653 | { 654 | "name": "Mike van Riel", 655 | "email": "me@mikevanriel.com" 656 | } 657 | ], 658 | "time": "2016-06-10 07:14:17" 659 | }, 660 | { 661 | "name": "phpspec/php-diff", 662 | "version": "v1.0.2", 663 | "source": { 664 | "type": "git", 665 | "url": "https://github.com/phpspec/php-diff.git", 666 | "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" 667 | }, 668 | "dist": { 669 | "type": "zip", 670 | "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", 671 | "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", 672 | "shasum": "" 673 | }, 674 | "type": "library", 675 | "autoload": { 676 | "psr-0": { 677 | "Diff": "lib/" 678 | } 679 | }, 680 | "notification-url": "https://packagist.org/downloads/", 681 | "license": [ 682 | "BSD-3-Clause" 683 | ], 684 | "authors": [ 685 | { 686 | "name": "Chris Boulton", 687 | "homepage": "http://github.com/chrisboulton", 688 | "role": "Original developer" 689 | } 690 | ], 691 | "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", 692 | "time": "2013-11-01 13:02:21" 693 | }, 694 | { 695 | "name": "phpspec/phpspec", 696 | "version": "2.5.0", 697 | "source": { 698 | "type": "git", 699 | "url": "https://github.com/phpspec/phpspec.git", 700 | "reference": "385ecb015e97c13818074f1517928b24d4a26067" 701 | }, 702 | "dist": { 703 | "type": "zip", 704 | "url": "https://api.github.com/repos/phpspec/phpspec/zipball/385ecb015e97c13818074f1517928b24d4a26067", 705 | "reference": "385ecb015e97c13818074f1517928b24d4a26067", 706 | "shasum": "" 707 | }, 708 | "require": { 709 | "doctrine/instantiator": "^1.0.1", 710 | "ext-tokenizer": "*", 711 | "php": ">=5.3.3", 712 | "phpspec/php-diff": "~1.0.0", 713 | "phpspec/prophecy": "~1.4", 714 | "sebastian/exporter": "~1.0", 715 | "symfony/console": "~2.3|~3.0", 716 | "symfony/event-dispatcher": "~2.1|~3.0", 717 | "symfony/finder": "~2.1|~3.0", 718 | "symfony/process": "^2.6|~3.0", 719 | "symfony/yaml": "~2.1|~3.0" 720 | }, 721 | "require-dev": { 722 | "behat/behat": "^3.0.11", 723 | "bossa/phpspec2-expect": "~1.0", 724 | "phpunit/phpunit": "~4.4", 725 | "symfony/filesystem": "~2.1|~3.0" 726 | }, 727 | "suggest": { 728 | "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" 729 | }, 730 | "bin": [ 731 | "bin/phpspec" 732 | ], 733 | "type": "library", 734 | "extra": { 735 | "branch-alias": { 736 | "dev-master": "2.2.x-dev" 737 | } 738 | }, 739 | "autoload": { 740 | "psr-0": { 741 | "PhpSpec": "src/" 742 | } 743 | }, 744 | "notification-url": "https://packagist.org/downloads/", 745 | "license": [ 746 | "MIT" 747 | ], 748 | "authors": [ 749 | { 750 | "name": "Konstantin Kudryashov", 751 | "email": "ever.zet@gmail.com", 752 | "homepage": "http://everzet.com" 753 | }, 754 | { 755 | "name": "Marcello Duarte", 756 | "homepage": "http://marcelloduarte.net/" 757 | } 758 | ], 759 | "description": "Specification-oriented BDD framework for PHP 5.3+", 760 | "homepage": "http://phpspec.net/", 761 | "keywords": [ 762 | "BDD", 763 | "SpecBDD", 764 | "TDD", 765 | "spec", 766 | "specification", 767 | "testing", 768 | "tests" 769 | ], 770 | "time": "2016-03-20 20:34:32" 771 | }, 772 | { 773 | "name": "phpspec/prophecy", 774 | "version": "v1.6.1", 775 | "source": { 776 | "type": "git", 777 | "url": "https://github.com/phpspec/prophecy.git", 778 | "reference": "58a8137754bc24b25740d4281399a4a3596058e0" 779 | }, 780 | "dist": { 781 | "type": "zip", 782 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", 783 | "reference": "58a8137754bc24b25740d4281399a4a3596058e0", 784 | "shasum": "" 785 | }, 786 | "require": { 787 | "doctrine/instantiator": "^1.0.2", 788 | "php": "^5.3|^7.0", 789 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", 790 | "sebastian/comparator": "^1.1", 791 | "sebastian/recursion-context": "^1.0" 792 | }, 793 | "require-dev": { 794 | "phpspec/phpspec": "^2.0" 795 | }, 796 | "type": "library", 797 | "extra": { 798 | "branch-alias": { 799 | "dev-master": "1.6.x-dev" 800 | } 801 | }, 802 | "autoload": { 803 | "psr-0": { 804 | "Prophecy\\": "src/" 805 | } 806 | }, 807 | "notification-url": "https://packagist.org/downloads/", 808 | "license": [ 809 | "MIT" 810 | ], 811 | "authors": [ 812 | { 813 | "name": "Konstantin Kudryashov", 814 | "email": "ever.zet@gmail.com", 815 | "homepage": "http://everzet.com" 816 | }, 817 | { 818 | "name": "Marcello Duarte", 819 | "email": "marcello.duarte@gmail.com" 820 | } 821 | ], 822 | "description": "Highly opinionated mocking framework for PHP 5.3+", 823 | "homepage": "https://github.com/phpspec/prophecy", 824 | "keywords": [ 825 | "Double", 826 | "Dummy", 827 | "fake", 828 | "mock", 829 | "spy", 830 | "stub" 831 | ], 832 | "time": "2016-06-07 08:13:47" 833 | }, 834 | { 835 | "name": "sebastian/comparator", 836 | "version": "1.2.0", 837 | "source": { 838 | "type": "git", 839 | "url": "https://github.com/sebastianbergmann/comparator.git", 840 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" 841 | }, 842 | "dist": { 843 | "type": "zip", 844 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", 845 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", 846 | "shasum": "" 847 | }, 848 | "require": { 849 | "php": ">=5.3.3", 850 | "sebastian/diff": "~1.2", 851 | "sebastian/exporter": "~1.2" 852 | }, 853 | "require-dev": { 854 | "phpunit/phpunit": "~4.4" 855 | }, 856 | "type": "library", 857 | "extra": { 858 | "branch-alias": { 859 | "dev-master": "1.2.x-dev" 860 | } 861 | }, 862 | "autoload": { 863 | "classmap": [ 864 | "src/" 865 | ] 866 | }, 867 | "notification-url": "https://packagist.org/downloads/", 868 | "license": [ 869 | "BSD-3-Clause" 870 | ], 871 | "authors": [ 872 | { 873 | "name": "Jeff Welch", 874 | "email": "whatthejeff@gmail.com" 875 | }, 876 | { 877 | "name": "Volker Dusch", 878 | "email": "github@wallbash.com" 879 | }, 880 | { 881 | "name": "Bernhard Schussek", 882 | "email": "bschussek@2bepublished.at" 883 | }, 884 | { 885 | "name": "Sebastian Bergmann", 886 | "email": "sebastian@phpunit.de" 887 | } 888 | ], 889 | "description": "Provides the functionality to compare PHP values for equality", 890 | "homepage": "http://www.github.com/sebastianbergmann/comparator", 891 | "keywords": [ 892 | "comparator", 893 | "compare", 894 | "equality" 895 | ], 896 | "time": "2015-07-26 15:48:44" 897 | }, 898 | { 899 | "name": "sebastian/diff", 900 | "version": "1.4.1", 901 | "source": { 902 | "type": "git", 903 | "url": "https://github.com/sebastianbergmann/diff.git", 904 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" 905 | }, 906 | "dist": { 907 | "type": "zip", 908 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", 909 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", 910 | "shasum": "" 911 | }, 912 | "require": { 913 | "php": ">=5.3.3" 914 | }, 915 | "require-dev": { 916 | "phpunit/phpunit": "~4.8" 917 | }, 918 | "type": "library", 919 | "extra": { 920 | "branch-alias": { 921 | "dev-master": "1.4-dev" 922 | } 923 | }, 924 | "autoload": { 925 | "classmap": [ 926 | "src/" 927 | ] 928 | }, 929 | "notification-url": "https://packagist.org/downloads/", 930 | "license": [ 931 | "BSD-3-Clause" 932 | ], 933 | "authors": [ 934 | { 935 | "name": "Kore Nordmann", 936 | "email": "mail@kore-nordmann.de" 937 | }, 938 | { 939 | "name": "Sebastian Bergmann", 940 | "email": "sebastian@phpunit.de" 941 | } 942 | ], 943 | "description": "Diff implementation", 944 | "homepage": "https://github.com/sebastianbergmann/diff", 945 | "keywords": [ 946 | "diff" 947 | ], 948 | "time": "2015-12-08 07:14:41" 949 | }, 950 | { 951 | "name": "sebastian/exporter", 952 | "version": "1.2.2", 953 | "source": { 954 | "type": "git", 955 | "url": "https://github.com/sebastianbergmann/exporter.git", 956 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" 957 | }, 958 | "dist": { 959 | "type": "zip", 960 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", 961 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", 962 | "shasum": "" 963 | }, 964 | "require": { 965 | "php": ">=5.3.3", 966 | "sebastian/recursion-context": "~1.0" 967 | }, 968 | "require-dev": { 969 | "ext-mbstring": "*", 970 | "phpunit/phpunit": "~4.4" 971 | }, 972 | "type": "library", 973 | "extra": { 974 | "branch-alias": { 975 | "dev-master": "1.3.x-dev" 976 | } 977 | }, 978 | "autoload": { 979 | "classmap": [ 980 | "src/" 981 | ] 982 | }, 983 | "notification-url": "https://packagist.org/downloads/", 984 | "license": [ 985 | "BSD-3-Clause" 986 | ], 987 | "authors": [ 988 | { 989 | "name": "Jeff Welch", 990 | "email": "whatthejeff@gmail.com" 991 | }, 992 | { 993 | "name": "Volker Dusch", 994 | "email": "github@wallbash.com" 995 | }, 996 | { 997 | "name": "Bernhard Schussek", 998 | "email": "bschussek@2bepublished.at" 999 | }, 1000 | { 1001 | "name": "Sebastian Bergmann", 1002 | "email": "sebastian@phpunit.de" 1003 | }, 1004 | { 1005 | "name": "Adam Harvey", 1006 | "email": "aharvey@php.net" 1007 | } 1008 | ], 1009 | "description": "Provides the functionality to export PHP variables for visualization", 1010 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1011 | "keywords": [ 1012 | "export", 1013 | "exporter" 1014 | ], 1015 | "time": "2016-06-17 09:04:28" 1016 | }, 1017 | { 1018 | "name": "sebastian/recursion-context", 1019 | "version": "1.0.2", 1020 | "source": { 1021 | "type": "git", 1022 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1023 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791" 1024 | }, 1025 | "dist": { 1026 | "type": "zip", 1027 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", 1028 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791", 1029 | "shasum": "" 1030 | }, 1031 | "require": { 1032 | "php": ">=5.3.3" 1033 | }, 1034 | "require-dev": { 1035 | "phpunit/phpunit": "~4.4" 1036 | }, 1037 | "type": "library", 1038 | "extra": { 1039 | "branch-alias": { 1040 | "dev-master": "1.0.x-dev" 1041 | } 1042 | }, 1043 | "autoload": { 1044 | "classmap": [ 1045 | "src/" 1046 | ] 1047 | }, 1048 | "notification-url": "https://packagist.org/downloads/", 1049 | "license": [ 1050 | "BSD-3-Clause" 1051 | ], 1052 | "authors": [ 1053 | { 1054 | "name": "Jeff Welch", 1055 | "email": "whatthejeff@gmail.com" 1056 | }, 1057 | { 1058 | "name": "Sebastian Bergmann", 1059 | "email": "sebastian@phpunit.de" 1060 | }, 1061 | { 1062 | "name": "Adam Harvey", 1063 | "email": "aharvey@php.net" 1064 | } 1065 | ], 1066 | "description": "Provides functionality to recursively process PHP variables", 1067 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1068 | "time": "2015-11-11 19:50:13" 1069 | }, 1070 | { 1071 | "name": "symfony/event-dispatcher", 1072 | "version": "v3.1.2", 1073 | "source": { 1074 | "type": "git", 1075 | "url": "https://github.com/symfony/event-dispatcher.git", 1076 | "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5" 1077 | }, 1078 | "dist": { 1079 | "type": "zip", 1080 | "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5", 1081 | "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5", 1082 | "shasum": "" 1083 | }, 1084 | "require": { 1085 | "php": ">=5.5.9" 1086 | }, 1087 | "require-dev": { 1088 | "psr/log": "~1.0", 1089 | "symfony/config": "~2.8|~3.0", 1090 | "symfony/dependency-injection": "~2.8|~3.0", 1091 | "symfony/expression-language": "~2.8|~3.0", 1092 | "symfony/stopwatch": "~2.8|~3.0" 1093 | }, 1094 | "suggest": { 1095 | "symfony/dependency-injection": "", 1096 | "symfony/http-kernel": "" 1097 | }, 1098 | "type": "library", 1099 | "extra": { 1100 | "branch-alias": { 1101 | "dev-master": "3.1-dev" 1102 | } 1103 | }, 1104 | "autoload": { 1105 | "psr-4": { 1106 | "Symfony\\Component\\EventDispatcher\\": "" 1107 | }, 1108 | "exclude-from-classmap": [ 1109 | "/Tests/" 1110 | ] 1111 | }, 1112 | "notification-url": "https://packagist.org/downloads/", 1113 | "license": [ 1114 | "MIT" 1115 | ], 1116 | "authors": [ 1117 | { 1118 | "name": "Fabien Potencier", 1119 | "email": "fabien@symfony.com" 1120 | }, 1121 | { 1122 | "name": "Symfony Community", 1123 | "homepage": "https://symfony.com/contributors" 1124 | } 1125 | ], 1126 | "description": "Symfony EventDispatcher Component", 1127 | "homepage": "https://symfony.com", 1128 | "time": "2016-06-29 05:41:56" 1129 | }, 1130 | { 1131 | "name": "symfony/finder", 1132 | "version": "v3.1.2", 1133 | "source": { 1134 | "type": "git", 1135 | "url": "https://github.com/symfony/finder.git", 1136 | "reference": "8201978de88a9fa0923e18601bb17f1df9c721e7" 1137 | }, 1138 | "dist": { 1139 | "type": "zip", 1140 | "url": "https://api.github.com/repos/symfony/finder/zipball/8201978de88a9fa0923e18601bb17f1df9c721e7", 1141 | "reference": "8201978de88a9fa0923e18601bb17f1df9c721e7", 1142 | "shasum": "" 1143 | }, 1144 | "require": { 1145 | "php": ">=5.5.9" 1146 | }, 1147 | "type": "library", 1148 | "extra": { 1149 | "branch-alias": { 1150 | "dev-master": "3.1-dev" 1151 | } 1152 | }, 1153 | "autoload": { 1154 | "psr-4": { 1155 | "Symfony\\Component\\Finder\\": "" 1156 | }, 1157 | "exclude-from-classmap": [ 1158 | "/Tests/" 1159 | ] 1160 | }, 1161 | "notification-url": "https://packagist.org/downloads/", 1162 | "license": [ 1163 | "MIT" 1164 | ], 1165 | "authors": [ 1166 | { 1167 | "name": "Fabien Potencier", 1168 | "email": "fabien@symfony.com" 1169 | }, 1170 | { 1171 | "name": "Symfony Community", 1172 | "homepage": "https://symfony.com/contributors" 1173 | } 1174 | ], 1175 | "description": "Symfony Finder Component", 1176 | "homepage": "https://symfony.com", 1177 | "time": "2016-06-29 05:41:56" 1178 | }, 1179 | { 1180 | "name": "symfony/process", 1181 | "version": "v3.1.2", 1182 | "source": { 1183 | "type": "git", 1184 | "url": "https://github.com/symfony/process.git", 1185 | "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" 1186 | }, 1187 | "dist": { 1188 | "type": "zip", 1189 | "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", 1190 | "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", 1191 | "shasum": "" 1192 | }, 1193 | "require": { 1194 | "php": ">=5.5.9" 1195 | }, 1196 | "type": "library", 1197 | "extra": { 1198 | "branch-alias": { 1199 | "dev-master": "3.1-dev" 1200 | } 1201 | }, 1202 | "autoload": { 1203 | "psr-4": { 1204 | "Symfony\\Component\\Process\\": "" 1205 | }, 1206 | "exclude-from-classmap": [ 1207 | "/Tests/" 1208 | ] 1209 | }, 1210 | "notification-url": "https://packagist.org/downloads/", 1211 | "license": [ 1212 | "MIT" 1213 | ], 1214 | "authors": [ 1215 | { 1216 | "name": "Fabien Potencier", 1217 | "email": "fabien@symfony.com" 1218 | }, 1219 | { 1220 | "name": "Symfony Community", 1221 | "homepage": "https://symfony.com/contributors" 1222 | } 1223 | ], 1224 | "description": "Symfony Process Component", 1225 | "homepage": "https://symfony.com", 1226 | "time": "2016-06-29 05:42:25" 1227 | }, 1228 | { 1229 | "name": "symfony/yaml", 1230 | "version": "v3.1.2", 1231 | "source": { 1232 | "type": "git", 1233 | "url": "https://github.com/symfony/yaml.git", 1234 | "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" 1235 | }, 1236 | "dist": { 1237 | "type": "zip", 1238 | "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", 1239 | "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", 1240 | "shasum": "" 1241 | }, 1242 | "require": { 1243 | "php": ">=5.5.9" 1244 | }, 1245 | "type": "library", 1246 | "extra": { 1247 | "branch-alias": { 1248 | "dev-master": "3.1-dev" 1249 | } 1250 | }, 1251 | "autoload": { 1252 | "psr-4": { 1253 | "Symfony\\Component\\Yaml\\": "" 1254 | }, 1255 | "exclude-from-classmap": [ 1256 | "/Tests/" 1257 | ] 1258 | }, 1259 | "notification-url": "https://packagist.org/downloads/", 1260 | "license": [ 1261 | "MIT" 1262 | ], 1263 | "authors": [ 1264 | { 1265 | "name": "Fabien Potencier", 1266 | "email": "fabien@symfony.com" 1267 | }, 1268 | { 1269 | "name": "Symfony Community", 1270 | "homepage": "https://symfony.com/contributors" 1271 | } 1272 | ], 1273 | "description": "Symfony Yaml Component", 1274 | "homepage": "https://symfony.com", 1275 | "time": "2016-06-29 05:41:56" 1276 | }, 1277 | { 1278 | "name": "webmozart/assert", 1279 | "version": "1.0.2", 1280 | "source": { 1281 | "type": "git", 1282 | "url": "https://github.com/webmozart/assert.git", 1283 | "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" 1284 | }, 1285 | "dist": { 1286 | "type": "zip", 1287 | "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", 1288 | "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", 1289 | "shasum": "" 1290 | }, 1291 | "require": { 1292 | "php": ">=5.3.3" 1293 | }, 1294 | "require-dev": { 1295 | "phpunit/phpunit": "^4.6" 1296 | }, 1297 | "type": "library", 1298 | "extra": { 1299 | "branch-alias": { 1300 | "dev-master": "1.0-dev" 1301 | } 1302 | }, 1303 | "autoload": { 1304 | "psr-4": { 1305 | "Webmozart\\Assert\\": "src/" 1306 | } 1307 | }, 1308 | "notification-url": "https://packagist.org/downloads/", 1309 | "license": [ 1310 | "MIT" 1311 | ], 1312 | "authors": [ 1313 | { 1314 | "name": "Bernhard Schussek", 1315 | "email": "bschussek@gmail.com" 1316 | } 1317 | ], 1318 | "description": "Assertions to validate method input/output with nice error messages.", 1319 | "keywords": [ 1320 | "assert", 1321 | "check", 1322 | "validate" 1323 | ], 1324 | "time": "2015-08-24 13:29:44" 1325 | } 1326 | ], 1327 | "aliases": [], 1328 | "minimum-stability": "stable", 1329 | "stability-flags": [], 1330 | "prefer-stable": false, 1331 | "prefer-lowest": false, 1332 | "platform": [], 1333 | "platform-dev": [] 1334 | } 1335 | -------------------------------------------------------------------------------- /04-import-from-sitemap/fixtures/sample-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |hello
{all_fields}'; 86 | 87 | GFCommon::send_notification($notification, $form, $lead); 88 | } 89 | } 90 | } 91 | } 92 | 93 | 94 | /* Save Form Options */ 95 | 96 | public function save_settings() { 97 | if(isset($_POST['gf_gathercontent_nonce'])) { 98 | 99 | $current_tab = rgempty('view', $_GET) ? 'api' : rgget('view'); 100 | 101 | if(!in_array($current_tab, array('api', 'mapping'))) { 102 | $current_tab = 'api'; 103 | } 104 | 105 | 106 | check_admin_referer("gf_gathercontent", "gf_gathercontent_nonce"); 107 | 108 | $gravity_gc = $_POST['gravity_gc']; 109 | 110 | if($current_tab == 'api') { 111 | 112 | $api = array( 113 | 'auth' => array( 114 | $gravity_gc['email'], 115 | $gravity_gc['apikey'], 116 | ), 117 | 'account' => 0, 118 | ); 119 | 120 | if(isset($gravity_gc['account'])) { 121 | $api['account'] = $gravity_gc['account']; 122 | } 123 | 124 | update_option('gravity_gc_api', $api); 125 | } 126 | 127 | if($current_tab == 'mapping') { 128 | 129 | $form_id = rgempty('form_id', $_GET) ? -1 : rgget('form_id'); 130 | $form_id = intval($form_id); 131 | 132 | $project_id = rgempty('project_id', $_GET) ? -1 : rgget('project_id'); 133 | $project_id = intval($project_id); 134 | 135 | $template_id = rgempty('template_id', $_GET) ? -1 : rgget('template_id'); 136 | $template_id = intval($template_id); 137 | 138 | if($form_id > -1) { 139 | 140 | $mapping = array( 141 | 'project_id' => $project_id, 142 | 'template_id' => $template_id, 143 | 'title' => array( 144 | 'fields' => array(), 145 | 'lengths' => array() 146 | ), 147 | 'fields' => array() 148 | ); 149 | 150 | $title = $gravity_gc['title']; 151 | 152 | if(isset($title['fields'])) { 153 | $mapping['title']['fields'] = $title['fields']; 154 | 155 | foreach($title['fields'] as $field) { 156 | $mapping['title']['lengths'][$field] = $title['lengths'][$field]; 157 | } 158 | } 159 | 160 | 161 | $fields = $gravity_gc['fields']; 162 | 163 | if(!empty($fields)) { 164 | foreach($fields as $field_id => $gc_name) { 165 | if(intval($gc_name) !== -1) { 166 | $mapping['fields'][$field_id] = $gc_name; 167 | } 168 | } 169 | } 170 | 171 | update_option('gravity_gc_' . $form_id, $mapping); 172 | } 173 | } 174 | } 175 | 176 | } 177 | 178 | 179 | /* Options Pages */ 180 | 181 | public function _options_api() { 182 | 183 | if(!empty($this->auth[0])) { 184 | $html = $this->_get_accounts_dropdown(); 185 | } 186 | else { 187 | $html = ''; 188 | } 189 | ?> 190 | 209 | 'mapping', 227 | ); 228 | 229 | $select = ' 230 | '; 250 | 251 | 252 | 253 | $mappings = get_option('gravity_gc_' . $form_id); 254 | if(!$mappings) { 255 | $mappings = array( 256 | 'project_id' => $project_id, 257 | 'template_id' => $template_id, 258 | 'title' => array(), 259 | 'fields' => array() 260 | ); 261 | } 262 | 263 | ?> 264 |