public function addMetaBoxes()
    {

        $this->metaBoxes->rewind();
        while ($this->metaBoxes->valid()) {

            $metaBox = $this->metaBoxes->current();

            foreach ($metaBox->getSupportedPostTypes() as $postType) {

                add_meta_box(
                    $metaBox->getID(),
                    $metaBox->getTitle(),
                    array(
                        $metaBox,
                        'getCallback'
                    ),
                    $postType,
                    $metaBox->getContext(),
                    $metaBox->getPriority(),
                    $metaBox->getCallbackArgs()
                );

                add_action('save_post', array($metaBox, 'savePostCallback'));

            }

            $this->metaBoxes->next();

        }

    }