You are here

public function ClassMetadata::__construct in Plug 7

Constructs a metadata for the given class.

Parameters

string $class:

File

lib/Symfony/validator/Symfony/Component/Validator/Mapping/ClassMetadata.php, line 118

Class

ClassMetadata
Default implementation of {@link ClassMetadataInterface}.

Namespace

Symfony\Component\Validator\Mapping

Code

public function __construct($class) {
  $this->name = $class;

  // class name without namespace
  if (false !== ($nsSep = strrpos($class, '\\'))) {
    $this->defaultGroup = substr($class, $nsSep + 1);
  }
  else {
    $this->defaultGroup = $class;
  }
}