File: src/Transformation/DigitsOnly.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Cipher Sweet  >  src/Transformation/DigitsOnly.php  >  Download  
File: src/Transformation/DigitsOnly.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Cipher Sweet
Encrypt data in away that can be searched
Author: By
Last change:
Date: 2 years ago
Size: 502 bytes


Class file image Download
namespace ParagonIE\CipherSweet\Transformation;


 * Class DigitsOnly
 * @package ParagonIE\CipherSweet\Transformation
class DigitsOnly implements TransformationInterface
     * Strips off any non-numeric characters (including periods and commas).
     * @param string $input
     * @return string
public function __invoke($input)
        return \
preg_replace('/[^0-9]/', '', $input);

For more information send a message to info at phpclasses dot org.