| Total Complexity | 93 |
| Total Lines | 499 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like CcVersion1 often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CcVersion1, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 21 | class CcVersion1 extends CcVersionBase |
||
| 22 | { |
||
| 23 | public const WEBCONTENT = 'webcontent'; |
||
| 24 | public const QUESTIONBANK = 'imsqti_xmlv1p2/imscc_xmlv1p0/question-bank'; |
||
| 25 | public const ASSESSMENT = 'imsqti_xmlv1p2/imscc_xmlv1p0/assessment'; |
||
| 26 | public const ASSOCIATEDCONTENT = 'associatedcontent/imscc_xmlv1p0/learning-application-resource'; |
||
| 27 | public const DISCUSSIONTOPIC = 'imsdt_xmlv1p0'; |
||
| 28 | public const WEBLINK = 'imswl_xmlv1p0'; |
||
| 29 | |||
| 30 | public static $checker = [self::WEBCONTENT, |
||
| 31 | self::ASSESSMENT, |
||
| 32 | self::ASSOCIATEDCONTENT, |
||
| 33 | self::DISCUSSIONTOPIC, |
||
| 34 | self::QUESTIONBANK, |
||
| 35 | self::WEBLINK, ]; |
||
| 36 | |||
| 37 | public function __construct() |
||
| 38 | { |
||
| 39 | $this->ccnamespaces = ['imscc' => 'http://www.imsglobal.org/xsd/imscc/imscp_v1p1', |
||
| 40 | 'lomimscc' => 'http://ltsc.ieee.org/xsd/imscc/LOM', |
||
| 41 | 'lom' => 'http://ltsc.ieee.org/xsd/LOM', |
||
| 42 | 'voc' => 'http://ltsc.ieee.org/xsd/LOM/vocab', |
||
| 43 | 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', |
||
| 44 | ]; |
||
| 45 | |||
| 46 | $this->ccnsnames = [ |
||
| 47 | 'imscc' => 'http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/imscp_v1p2_localised.xsd', |
||
| 48 | 'lom' => 'http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_2/lomLoose_localised.xsd', |
||
| 49 | 'lomimscc' => 'http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_1/lomLoose_localised.xsd', |
||
| 50 | 'voc' => 'http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_2/vocab/loose.xsd', |
||
| 51 | ]; |
||
| 52 | |||
| 53 | $this->ccversion = '1.0.0'; |
||
| 54 | $this->camversion = '1.0.0'; |
||
| 55 | $this->_generator = 'Common Cartridge generator'; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Validate if the type are valid or not. |
||
| 60 | * |
||
| 61 | * @param string $type |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | public function valid($type) |
||
| 66 | { |
||
| 67 | return \in_array($type, self::$checker); |
||
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Create Education Metadata (How To). |
||
| 72 | * |
||
| 73 | * @param object $met |
||
| 74 | * @param object $xmlnode |
||
| 75 | * |
||
| 76 | * @return DOMNode |
||
|
|
|||
| 77 | */ |
||
| 78 | public function createMetadataEducational($met, DOMDocument &$doc, $xmlnode) |
||
| 79 | { |
||
| 80 | $nd = $doc->createElementNS($this->ccnamespaces['lom'], 'educational'); |
||
| 81 | $nd2 = $doc->createElementNS($this->ccnamespaces['lom'], 'intendedEndUserRole'); |
||
| 82 | $nd3 = $doc->createElementNS($this->ccnamespaces['voc'], 'vocabulary'); |
||
| 83 | |||
| 84 | $xmlnode->appendChild($nd); |
||
| 85 | $nd->appendChild($nd2); |
||
| 86 | $nd2->appendChild($nd3); |
||
| 87 | |||
| 88 | foreach ($met->arrayeducational as $name => $value) { |
||
| 89 | !\is_array($value) ? $value = [$value] : null; |
||
| 90 | foreach ($value as $v) { |
||
| 91 | $nd4 = $doc->createElementNS($this->ccnamespaces['voc'], $name, $v[0]); |
||
| 92 | $nd3->appendChild($nd4); |
||
| 93 | } |
||
| 94 | } |
||
| 95 | |||
| 96 | return $nd; |
||
| 97 | } |
||
| 98 | |||
| 99 | protected function onCreate(DOMDocument &$doc, $rootmanifestnode = null, $nmanifestID = null) |
||
| 100 | { |
||
| 101 | $doc->formatOutput = true; |
||
| 102 | $doc->preserveWhiteSpace = true; |
||
| 103 | |||
| 104 | $this->manifestID = null === $nmanifestID ? CcHelpers::uuidgen('M_') : $nmanifestID; |
||
| 105 | $mUUID = $doc->createAttribute('identifier'); |
||
| 106 | $mUUID->nodeValue = $this->manifestID; |
||
| 107 | |||
| 108 | if (null === $rootmanifestnode) { |
||
| 109 | if (!empty($this->_generator)) { |
||
| 110 | $comment = $doc->createComment($this->_generator); |
||
| 111 | $doc->appendChild($comment); |
||
| 112 | } |
||
| 113 | |||
| 114 | $rootel = $doc->createElementNS($this->ccnamespaces['imscc'], 'manifest'); |
||
| 115 | $rootel->appendChild($mUUID); |
||
| 116 | $doc->appendChild($rootel); |
||
| 117 | |||
| 118 | // Add all namespaces. |
||
| 119 | foreach ($this->ccnamespaces as $key => $value) { |
||
| 120 | $dummy_attr = $key.':dummy'; |
||
| 121 | $doc->createAttributeNS($value, $dummy_attr); |
||
| 122 | } |
||
| 123 | |||
| 124 | // Add location of schemas. |
||
| 125 | $schemaLocation = ''; |
||
| 126 | foreach ($this->ccnsnames as $key => $value) { |
||
| 127 | $vt = empty($schemaLocation) ? '' : ' '; |
||
| 128 | $schemaLocation .= $vt.$this->ccnamespaces[$key].' '.$value; |
||
| 129 | } |
||
| 130 | $aSchemaLoc = $doc->createAttributeNS($this->ccnamespaces['xsi'], 'xsi:schemaLocation'); |
||
| 131 | $aSchemaLoc->nodeValue = $schemaLocation; |
||
| 132 | $rootel->appendChild($aSchemaLoc); |
||
| 133 | } else { |
||
| 134 | $rootel = $doc->createElementNS($this->ccnamespaces['imscc'], 'imscc:manifest'); |
||
| 135 | $rootel->appendChild($mUUID); |
||
| 136 | } |
||
| 137 | |||
| 138 | $metadata = $doc->createElementNS($this->ccnamespaces['imscc'], 'metadata'); |
||
| 139 | $schema = $doc->createElementNS($this->ccnamespaces['imscc'], 'schema', 'IMS Common Cartridge'); |
||
| 140 | $schemaversion = $doc->createElementNS($this->ccnamespaces['imscc'], 'schemaversion', $this->ccversion); |
||
| 141 | |||
| 142 | $metadata->appendChild($schema); |
||
| 143 | $metadata->appendChild($schemaversion); |
||
| 144 | $rootel->appendChild($metadata); |
||
| 145 | |||
| 146 | if (null !== $rootmanifestnode) { |
||
| 147 | $rootmanifestnode->appendChild($rootel); |
||
| 148 | } |
||
| 149 | |||
| 150 | $organizations = $doc->createElementNS($this->ccnamespaces['imscc'], 'organizations'); |
||
| 151 | $rootel->appendChild($organizations); |
||
| 152 | $resources = $doc->createElementNS($this->ccnamespaces['imscc'], 'resources'); |
||
| 153 | $rootel->appendChild($resources); |
||
| 154 | |||
| 155 | return true; |
||
| 156 | } |
||
| 157 | |||
| 158 | protected function updateAttribute(DOMDocument &$doc, $attrname, $attrvalue, DOMElement &$node) |
||
| 159 | { |
||
| 160 | $busenew = (\is_object($node) && $node->hasAttribute($attrname)); |
||
| 161 | $nResult = null; |
||
| 162 | if (!$busenew && null === $attrvalue) { |
||
| 163 | $node->removeAttribute($attrname); |
||
| 164 | } else { |
||
| 165 | $nResult = $busenew ? $node->getAttributeNode($attrname) : $doc->createAttribute($attrname); |
||
| 166 | $nResult->nodeValue = $attrvalue; |
||
| 167 | if (!$busenew) { |
||
| 168 | $node->appendChild($nResult); |
||
| 169 | } |
||
| 170 | } |
||
| 171 | |||
| 172 | return $nResult; |
||
| 173 | } |
||
| 174 | |||
| 175 | protected function updateAttributeNs(DOMDocument &$doc, $attrname, $attrnamespace, $attrvalue, DOMElement &$node) |
||
| 176 | { |
||
| 177 | $busenew = (\is_object($node) && $node->hasAttributeNS($attrnamespace, $attrname)); |
||
| 178 | $nResult = null; |
||
| 179 | if (!$busenew && null === $attrvalue) { |
||
| 180 | $node->removeAttributeNS($attrnamespace, $attrname); |
||
| 181 | } else { |
||
| 182 | $nResult = $busenew ? $node->getAttributeNodeNS($attrnamespace, $attrname) : |
||
| 183 | $doc->createAttributeNS($attrnamespace, $attrname); |
||
| 184 | $nResult->nodeValue = $attrvalue; |
||
| 185 | if (!$busenew) { |
||
| 186 | $node->appendChild($nResult); |
||
| 187 | } |
||
| 188 | } |
||
| 189 | |||
| 190 | return $nResult; |
||
| 191 | } |
||
| 192 | |||
| 193 | protected function getChildNode(DOMDocument &$doc, $itemname, DOMElement &$node) |
||
| 199 | } |
||
| 200 | |||
| 201 | protected function updateChildItem(DOMDocument &$doc, $itemname, $itemvalue, DOMElement &$node, $attrtostore = null): void |
||
| 202 | { |
||
| 203 | $tnode = $this->getChildNode($doc, 'title', $node); |
||
| 204 | $usenew = null === $tnode; |
||
| 205 | $tnode = $usenew ? $doc->createElementNS($this->ccnamespaces['imscc'], $itemname) : $tnode; |
||
| 206 | if (null !== $attrtostore) { |
||
| 207 | foreach ($attrtostore as $key => $value) { |
||
| 208 | $this->updateAttribute($doc, $key, $value, $tnode); |
||
| 209 | } |
||
| 210 | } |
||
| 211 | $tnode->nodeValue = $itemvalue; |
||
| 212 | if ($usenew) { |
||
| 213 | $node->appendChild($tnode); |
||
| 214 | } |
||
| 215 | } |
||
| 216 | |||
| 217 | protected function updateItems($items, DOMDocument &$doc, DOMElement &$xmlnode): void |
||
| 218 | { |
||
| 219 | foreach ($items as $key => $item) { |
||
| 220 | $itemnode = $doc->createElementNS($this->ccnamespaces['imscc'], 'item'); |
||
| 221 | $this->updateAttribute($doc, 'identifier', $key, $itemnode); |
||
| 222 | $this->updateAttribute($doc, 'identifierref', $item->identifierref, $itemnode); |
||
| 223 | $this->updateAttribute($doc, 'parameters', $item->parameters, $itemnode); |
||
| 224 | if (!empty($item->title)) { |
||
| 225 | $titlenode = $doc->createElementNS( |
||
| 226 | $this->ccnamespaces['imscc'], |
||
| 227 | 'title', |
||
| 228 | $item->title |
||
| 229 | ); |
||
| 230 | $itemnode->appendChild($titlenode); |
||
| 231 | } |
||
| 232 | if ($item->hasChildItems()) { |
||
| 233 | $this->updateItems($item->childitems, $doc, $itemnode); |
||
| 234 | } |
||
| 235 | $xmlnode->appendChild($itemnode); |
||
| 236 | } |
||
| 237 | } |
||
| 238 | |||
| 239 | /** |
||
| 240 | * Create a Resource (How to). |
||
| 241 | * |
||
| 242 | * @param object $xmlnode |
||
| 243 | * |
||
| 244 | * @return DOMNode |
||
| 245 | */ |
||
| 246 | protected function createResource(CcIResource &$res, DOMDocument &$doc, $xmlnode = null) |
||
| 247 | { |
||
| 248 | $usenew = \is_object($xmlnode); |
||
| 249 | $dnode = $usenew ? $xmlnode : $doc->createElementNS($this->ccnamespaces['imscc'], 'resource'); |
||
| 250 | $this->updateAttribute($doc, 'identifier', $res->identifier, $dnode); |
||
| 251 | $this->updateAttribute($doc, 'type', $res->type, $dnode); |
||
| 252 | null !== $res->href ? $this->updateAttribute($doc, 'href', $res->href, $dnode) : null; |
||
| 253 | $this->updateAttribute($doc, 'base', $res->base, $dnode); |
||
| 254 | |||
| 255 | foreach ($res->files as $file) { |
||
| 256 | $nd = $doc->createElementNS($this->ccnamespaces['imscc'], 'file'); |
||
| 257 | $ndatt = $doc->createAttribute('href'); |
||
| 258 | $ndatt->nodeValue = $file; |
||
| 259 | $nd->appendChild($ndatt); |
||
| 260 | $dnode->appendChild($nd); |
||
| 261 | } |
||
| 262 | $this->resources[$res->identifier] = $res; |
||
| 263 | $this->resourcesInd[$res->files[0]] = $res->identifier; |
||
| 264 | |||
| 265 | foreach ($res->dependency as $dependency) { |
||
| 266 | $nd = $doc->createElementNS($this->ccnamespaces['imscc'], 'dependency'); |
||
| 267 | $ndatt = $doc->createAttribute('identifierref'); |
||
| 268 | $ndatt->nodeValue = $dependency; |
||
| 269 | $nd->appendChild($ndatt); |
||
| 270 | $dnode->appendChild($nd); |
||
| 271 | } |
||
| 272 | |||
| 273 | return $dnode; |
||
| 274 | } |
||
| 275 | |||
| 276 | /** |
||
| 277 | * Create an Item Folder (How To). |
||
| 278 | */ |
||
| 279 | protected function createItemFolder(CcIOrganization &$org, DOMDocument &$doc, ?DOMElement &$xmlnode = null): void |
||
| 293 | } |
||
| 294 | |||
| 295 | /** |
||
| 296 | * Create an Organization (How To). |
||
| 297 | * |
||
| 298 | * @param object $xmlnode |
||
| 299 | * |
||
| 300 | * @return DOMNode |
||
| 301 | */ |
||
| 302 | protected function createOrganization(CcIOrganization &$org, DOMDocument &$doc, $xmlnode = null) |
||
| 312 | } |
||
| 313 | |||
| 314 | /** |
||
| 315 | * Create Metadata For Manifest (How To). |
||
| 316 | * |
||
| 317 | * @param object $xmlnode |
||
| 318 | * |
||
| 319 | * @return DOMNode |
||
| 320 | */ |
||
| 321 | protected function createMetadataManifest(CcIMetadataManifest $met, DOMDocument &$doc, $xmlnode = null) |
||
| 322 | { |
||
| 323 | $dnode = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'lom'); |
||
| 324 | if (!empty($xmlnode)) { |
||
| 325 | $xmlnode->appendChild($dnode); |
||
| 326 | } |
||
| 327 | $dnodegeneral = empty($met->arraygeneral) ? null : $this->createMetadataGeneral($met, $doc, $xmlnode); |
||
| 328 | $dnodetechnical = empty($met->arraytech) ? null : $this->createMetadataTechnical($met, $doc, $xmlnode); |
||
| 329 | $dnoderights = empty($met->arrayrights) ? null : $this->createMetadataRights($met, $doc, $xmlnode); |
||
| 330 | $dnodelifecycle = empty($met->arraylifecycle) ? null : $this->createMetadataLifecycle($met, $doc, $xmlnode); |
||
| 331 | |||
| 332 | null !== $dnodegeneral ? $dnode->appendChild($dnodegeneral) : null; |
||
| 333 | null !== $dnodetechnical ? $dnode->appendChild($dnodetechnical) : null; |
||
| 334 | null !== $dnoderights ? $dnode->appendChild($dnoderights) : null; |
||
| 335 | null !== $dnodelifecycle ? $dnode->appendChild($dnodelifecycle) : null; |
||
| 336 | |||
| 337 | return $dnode; |
||
| 338 | } |
||
| 339 | |||
| 340 | /** |
||
| 341 | * Create Metadata For Resource (How To). |
||
| 342 | * |
||
| 343 | * @param object $xmlnode |
||
| 344 | * |
||
| 345 | * @return DOMNode |
||
| 346 | */ |
||
| 347 | protected function createMetadataResource(CcIMetadataResource $met, DOMDocument &$doc, $xmlnode = null) |
||
| 348 | { |
||
| 349 | $dnode = $doc->createElementNS($this->ccnamespaces['lom'], 'lom'); |
||
| 350 | |||
| 351 | !empty($xmlnode) ? $xmlnode->appendChild($dnode) : null; |
||
| 352 | !empty($met->arrayeducational) ? $this->createMetadataEducational($met, $doc, $dnode) : null; |
||
| 353 | |||
| 354 | return $dnode; |
||
| 355 | } |
||
| 356 | |||
| 357 | /** |
||
| 358 | * Create Metadata For File (How To). |
||
| 359 | * |
||
| 360 | * @param object $xmlnode |
||
| 361 | * |
||
| 362 | * @return DOMNode |
||
| 363 | */ |
||
| 364 | protected function createMetadataFile(CcIMetadataFile $met, DOMDocument &$doc, $xmlnode = null) |
||
| 365 | { |
||
| 366 | $dnode = $doc->createElementNS($this->ccnamespaces['lom'], 'lom'); |
||
| 367 | |||
| 368 | !empty($xmlnode) ? $xmlnode->appendChild($dnode) : null; |
||
| 369 | !empty($met->arrayeducational) ? $this->createMetadataEducational($met, $doc, $dnode) : null; |
||
| 370 | |||
| 371 | return $dnode; |
||
| 372 | } |
||
| 373 | |||
| 374 | /** |
||
| 375 | * Create General Metadata (How To). |
||
| 376 | * |
||
| 377 | * @param object $met |
||
| 378 | * @param object $xmlnode |
||
| 379 | * |
||
| 380 | * @return DOMNode |
||
| 381 | */ |
||
| 382 | protected function createMetadataGeneral($met, DOMDocument &$doc, $xmlnode) |
||
| 383 | { |
||
| 384 | $nd = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'general'); |
||
| 385 | |||
| 386 | foreach ($met->arraygeneral as $name => $value) { |
||
| 387 | !\is_array($value) ? $value = [$value] : null; |
||
| 388 | foreach ($value as $v) { |
||
| 389 | if ('language' != $name && 'catalog' != $name && 'entry' != $name) { |
||
| 390 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], $name); |
||
| 391 | $nd3 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'string', $v[1]); |
||
| 392 | $ndatt = $doc->createAttribute('language'); |
||
| 393 | $ndatt->nodeValue = $v[0]; |
||
| 394 | $nd3->appendChild($ndatt); |
||
| 395 | $nd2->appendChild($nd3); |
||
| 396 | $nd->appendChild($nd2); |
||
| 397 | } else { |
||
| 398 | if ('language' == $name) { |
||
| 399 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], $name, $v[0]); |
||
| 400 | $nd->appendChild($nd2); |
||
| 401 | } |
||
| 402 | } |
||
| 403 | } |
||
| 404 | } |
||
| 405 | if (!empty($met->arraygeneral['catalog']) || !empty($met->arraygeneral['entry'])) { |
||
| 406 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'identifier'); |
||
| 407 | $nd->appendChild($nd2); |
||
| 408 | if (!empty($met->arraygeneral['catalog'])) { |
||
| 409 | $nd3 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'catalog', $met->arraygeneral['catalog'][0][0]); |
||
| 410 | $nd2->appendChild($nd3); |
||
| 411 | } |
||
| 412 | if (!empty($met->arraygeneral['entry'])) { |
||
| 413 | $nd4 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'entry', $met->arraygeneral['entry'][0][0]); |
||
| 414 | $nd2->appendChild($nd4); |
||
| 415 | } |
||
| 416 | } |
||
| 417 | |||
| 418 | return $nd; |
||
| 419 | } |
||
| 420 | |||
| 421 | /** |
||
| 422 | * Create Technical Metadata (How To). |
||
| 423 | * |
||
| 424 | * @param object $met |
||
| 425 | * @param object $xmlnode |
||
| 426 | * |
||
| 427 | * @return DOMNode |
||
| 428 | */ |
||
| 429 | protected function createMetadataTechnical($met, DOMDocument &$doc, $xmlnode) |
||
| 430 | { |
||
| 431 | $nd = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'technical'); |
||
| 432 | $xmlnode->appendChild($nd); |
||
| 433 | |||
| 434 | foreach ($met->arraytech as $name => $value) { |
||
| 435 | !\is_array($value) ? $value = [$value] : null; |
||
| 436 | foreach ($value as $v) { |
||
| 437 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], $name, $v[0]); |
||
| 438 | $nd->appendChild($nd2); |
||
| 439 | } |
||
| 440 | } |
||
| 441 | |||
| 442 | return $nd; |
||
| 443 | } |
||
| 444 | |||
| 445 | /** |
||
| 446 | * Create Rights Metadata (How To). |
||
| 447 | * |
||
| 448 | * @param object $met |
||
| 449 | * @param object $xmlnode |
||
| 450 | * |
||
| 451 | * @return DOMNode |
||
| 452 | */ |
||
| 453 | protected function createMetadataRights($met, DOMDocument &$doc, $xmlnode) |
||
| 454 | { |
||
| 455 | $nd = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'rights'); |
||
| 456 | |||
| 457 | foreach ($met->arrayrights as $name => $value) { |
||
| 458 | !\is_array($value) ? $value = [$value] : null; |
||
| 459 | foreach ($value as $v) { |
||
| 460 | if ('description' == $name) { |
||
| 461 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], $name); |
||
| 462 | $nd3 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'string', $v[1]); |
||
| 463 | $ndatt = $doc->createAttribute('language'); |
||
| 464 | $ndatt->nodeValue = $v[0]; |
||
| 465 | $nd3->appendChild($ndatt); |
||
| 466 | $nd2->appendChild($nd3); |
||
| 467 | $nd->appendChild($nd2); |
||
| 468 | } elseif ('copyrightAndOtherRestrictions' == $name || 'cost' == $name) { |
||
| 469 | $nd2 = $doc->createElementNS($this->ccnamespaces['lomimscc'], $name); |
||
| 470 | $nd3 = $doc->createElementNS($this->ccnamespaces['lomimscc'], 'value', $v[0]); |
||
| 471 | $nd2->appendChild($nd3); |
||
| 472 | $nd->appendChild($nd2); |
||
| 473 | } |
||
| 474 | } |
||
| 475 | } |
||
| 476 | |||
| 477 | return $nd; |
||
| 478 | } |
||
| 479 | |||
| 480 | /** |
||
| 481 | * Create Lifecycle Metadata (How To). |
||
| 482 | * |
||
| 483 | * @param object $met |
||
| 484 | * @param object $doc |
||
| 485 | * @param object $xmlnode |
||
| 486 | * |
||
| 487 | * @return DOMNode |
||
| 488 | */ |
||
| 489 | protected function createMetadataLifecycle($met, DOMDocument &$doc, $xmlnode) |
||
| 520 | } |
||
| 521 | } |
||
| 522 |