protected function registerClassesFromMagicProperties()
    {
        $reflection      = new \ReflectionClass(self::class);

        $docComment      = $reflection->getDocComment();
        $magicProperties = $docComment ? explode(PHP_EOL, $docComment) : [];

        foreach ($magicProperties as $magicProperty) {
            if (strpos($magicProperty, '@property') === false) {
                continue;
            }

            $partsString = trim(str_replace('* @property', '', $magicProperty));
            $parts       = explode('$', $partsString);

            list($className, $property) = $parts;

            $this->registerClass(trim($property), trim($className));
        }
        return $this;
    }