Facebook\InstantArticles\Elements\Element::getClassName PHP Method

getClassName() public static method

Auxiliary method to extract all Elements full qualified class name.
public static getClassName ( ) : string
return string The full qualified name of class.
    public static function getClassName()
    {
        return get_called_class();
    }

Usage Example

 private function formatWarningMessage()
 {
     $object = Type::stringify($this->element);
     if (!$this->configuration) {
         $this->configuration = parse_ini_file("validator_warning_messages.ini", true);
     }
     $simple_class_name = substr(strrchr($this->element->getClassName(), '\\'), 1);
     if (!isset($this->configuration['warning_messages'][$simple_class_name])) {
         $message = 'Invalid content on the object.';
     } else {
         $message = $this->configuration['warning_messages'][$simple_class_name];
     }
     return $message;
 }
All Usage Examples Of Facebook\InstantArticles\Elements\Element::getClassName