/projects/netbeans-7.3/php.editor/test/unit/data/testfiles/formatting/html/issue183268.php

https://gitlab.com/essere.lab.public/qualitas.class-corpus · PHP · 151 lines · 67 code · 20 blank · 64 comment · 6 complexity · ecf6aac39ebcb8ed05af26d430cc93fc MD5 · raw file

  1. <?php
  2. /*
  3. * $LastChangedDate: 2010-04-14 03:44:57 +0200 (Wed, 14 Apr 2010) $
  4. * $Rev: 1550 $
  5. * $Id: Recruiters.php 1550 2010-04-14 01:44:57Z goran $
  6. */
  7. class Https_Institution_Get_Recruiters extends Subject implements IBuilder, IXHTMLable
  8. {
  9. /**
  10. * Holds atom signature
  11. *
  12. * @var string
  13. */
  14. private $atom = '';
  15. /**
  16. * Holds mode in which profile is opened
  17. *
  18. * @var Https_Institutions_Get_View
  19. */
  20. private $mode = null;
  21. /**
  22. * Class constructor
  23. *
  24. * @return void
  25. */
  26. function __construct()
  27. {
  28. parent::__construct();
  29. }
  30. /**
  31. * Implement IBuilder method for this page
  32. *
  33. * @access public
  34. * @return void
  35. *
  36. */
  37. public function build()
  38. {
  39. $this->setCss();
  40. $this->atom = Request::get()->string('rest', 'view');
  41. $this->checkAccess();
  42. $this->mode->modeBuild($this->atom);
  43. $this->notify();
  44. }
  45. private function checkAccess()
  46. {
  47. $ACObject = new AccessControl_Institution();
  48. $ACObject->setAction(IAccessControl::view);
  49. $ACObject->setAXOValue($this->atom);
  50. if (false === Access::check()->run($ACObject)) :
  51. throw new Exception('Cannot perform action: NOT AUTHORISED.', 2005);
  52. else :
  53. $ACObject->setAction(IAccessControl::update);
  54. if (true === Access::check()->run($ACObject)) :
  55. $this->mode = new Https_Institution_Get_Edit($this->atom);
  56. else :
  57. $this->mode = new Https_Institution_Get_View($this->atom);
  58. endif;
  59. endif;
  60. }
  61. /**
  62. * Gets page specific CSS
  63. */
  64. public function setCSS()
  65. {
  66. ob_start();
  67. ?>
  68. <link rel="stylesheet"
  69. href=":server:/js/dojox/form/resources/FileInput.css?:version:"
  70. type="text/css" />
  71. <?php
  72. $this->css = ob_get_contents();
  73. ob_end_clean();
  74. }
  75. /**
  76. * Implements IBuilder method build() for this page
  77. *
  78. * @access public
  79. * @return void
  80. */
  81. public function setHeader()
  82. {
  83. }
  84. /**
  85. * Implements IBuilder method for this page
  86. *
  87. * @access public
  88. * @return void
  89. *
  90. */
  91. public function setFooter()
  92. {
  93. }
  94. /**
  95. * Gets page specific JavaScript
  96. *
  97. * @access private
  98. * @return void
  99. */
  100. public function setJavaScript()
  101. {
  102. }
  103. /**
  104. * Gets current state of observed class property
  105. *
  106. * @param $variable mixed
  107. *
  108. * @access public
  109. * @return mixed
  110. */
  111. public function getState($variable)
  112. {
  113. if ("css" === $variable) :
  114. return $this->css;
  115. else :
  116. return $this->mode->getModeState($variable);
  117. endif;
  118. }
  119. /**
  120. * Implements XHTMLable methot toXHTML()
  121. * Renders employers registration page body
  122. *
  123. * @access public
  124. * @return void
  125. */
  126. public function toXHTML()
  127. {
  128. $this->mode->modeToXHTML();
  129. }
  130. }
  131. ?>