src/Encoder/StringEncoder.php
private function isClassName($value, array $options)
    {
        if (preg_match('/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(\\\\(?1))*$/', $value) !== 1) {
            return false;
        }

        return array_intersect(iterator_to_array($this->iterateNamespaces($value)), $options['string.classes']) !== [];
    }
private function isClassName($value, array $options)
    {
        if (preg_match('/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(\\\\(?1))*$/', $value) !== 1) {
            return false;
        }

        return array_intersect(iterator_to_array($this->iterateNamespaces($value)), $options['string.classes']) !== [];
    }
private function isClassName ( $ value , array $ options ) { if ( preg_match ( '/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(\\\\(?1))*$/' , $ value ) !== 1 ) { return false ; } return array_intersect ( iterator_to_array ( $ this -> iterateNamespaces ( $ value ) ) , $ options [ 'string.classes' ] ) !== [ ] ; }
Tests if the given value is a string that could be encoded as a class name constant.
@param string $value The string to test
@param array $options The string encoding options
@return bool True if string can be encoded as class constant, false if not
Tests if the given value is a string that could be encoded as a class name constant .