public function toObject($object = null, $skip = array()) { if (is_null($object)) { $object = new PdfFlavorParamsOutput(); } parent::toObject($object, $skip); $object->setType(DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::PDF)); }
public function toObject($object = null, $skip = array()) { if (is_null($object)) { $object = new flavorParams(); } parent::toObject($object, $skip); $object->setType(DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::DOCUMENT)); }
public function toObject($object = null, $skip = array()) { if (is_null($object)) { $object = new ImageFlavorParams(); } parent::toObject($object, $skip); $object->setType(DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::IMAGE)); return $object; }
public static function getObjectClass($baseClass, $enumValue) { // DOCUMENT ENTRY if ($baseClass == 'entry' && $enumValue == entryType::DOCUMENT) { return 'DocumentEntry'; } // FLAVOR PARAMS if ($baseClass == 'assetParams') { switch ($enumValue) { case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::PDF): return 'PdfFlavorParams'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::SWF): return 'SwfFlavorParams'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::DOCUMENT): return 'flavorParams'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::IMAGE): return 'ImageFlavorParams'; default: return null; } } if ($baseClass == 'assetParamsOutput') { switch ($enumValue) { case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::PDF): return 'PdfFlavorParamsOutput'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::SWF): return 'SwfFlavorParamsOutput'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::DOCUMENT): return 'flavorParamsOutput'; case DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::IMAGE): return 'ImageFlavorParamsOutput'; default: return null; } } return null; }
/** * Applies default values to this object. * This method should be called from the object's constructor (or * equivalent initialization method). * @see __construct() */ public function applyDefaultValues() { parent::applyDefaultValues(); $this->type = DocumentPlugin::getAssetTypeCoreValue(DocumentAssetType::IMAGE); }