コード例 #1
0
 public function setAccessDestinations($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
     $this->access_destinations = $bool;
     return $this;
 }
コード例 #2
0
 public function setSelectedByDefault($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
     $this->selected_by_default = $bool;
     return $this;
 }
コード例 #3
0
 public function setDoSFTP($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
     $this->getProperty()->doSFTP = $bool;
     return $this;
 }
コード例 #4
0
 private function moveRename($parent_container, $new_name, $doWorkflow = false)
 {
     if (!c\BooleanValues::isBoolean($doWorkflow)) {
         throw new e\UnacceptableValueException("The value {$doWorkflow} must be a boolean.");
     }
     $parent_id = NULL;
     if (isset($parent_container)) {
         $parent_id = $parent_container->getIdentifier();
     }
     $identifier = $this->getIdentifier();
     $this->getService()->move($identifier, $parent_id, $new_name, $doWorkflow);
     if (!$this->getService()->isSuccessful()) {
         throw new e\RenamingFailureException(c\M::RENAME_ASSET_FAILURE . $this->getService()->getMessage());
     }
 }
コード例 #5
0
 public function __call($func, $params)
 {
     // for metadata
     $methods = array('reportHasAuthor', 'reportHasNoAuthor', 'reportHasDisplayName', 'reportHasNoDisplayName', 'reportHasEndDate', 'reportHasNoEndDate', 'reportHasKeywords', 'reportHasNoKeywords', 'reportHasMetaDescription', 'reportHasNoMetaDescription', 'reportHasReviewDate', 'reportHasNoReviewDate', 'reportHasStartDate', 'reportHasNoStartDate', 'reportHasSummary', 'reportHasNoSummary', 'reportHasTeaser', 'reportHasNoTeaser', 'reportHasTitle', 'reportHasNoTitle', 'reportAuthorContains', 'reportDisplayNameContains', 'reportKeywordsContains', 'reportMetaDescriptionContains', 'reportSummaryContains', 'reportTeaserContains', 'reportTitleContains');
     if (!in_array($func, $methods)) {
         throw new e\NoSuchMethodException(S_SPAN . "The method Report::{$func} does not exist." . E_SPAN);
     }
     // page is the default for type
     if (isset($params[0])) {
         $type = $params[0];
     } else {
         $type = Page::TYPE;
     }
     // retraverse defaulted to false
     if (isset($params[1])) {
         $retraverse = $params[1];
     } else {
         $retraverse = false;
     }
     // retraverse defaulted to false
     if (isset($params[2])) {
         $substring = $params[2];
     } else {
         $substring = false;
     }
     if (!c\BooleanValues::isBoolean($retraverse)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$retraverse} must be a boolean." . E_SPAN);
     }
     if ($retraverse) {
         if (isset($substring)) {
             $this->reportMetadataWiredFields(1, $substring);
         } else {
             $this->reportMetadataWiredFields(1);
         }
     }
     if (isset($this->results[$type]) && isset($this->results[$type][$func])) {
         return $this->results[$type][$func];
     } else {
         return NULL;
     }
 }
コード例 #6
0
 public function setSendReportOnErrorOnly($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
     $this->getProperty()->sendReportOnErrorOnly = $bool;
     return $this;
 }
コード例 #7
0
 public function setShouldBePublished($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException("The value {$bool} must be a boolean");
     }
     $this->getProperty()->shouldBePublished = $bool;
     return $this;
 }
コード例 #8
0
 public function setAccessRights(p\AccessRightsInformation $ari, $apply_to_children = false)
 {
     if (!c\BooleanValues::isBoolean($apply_to_children)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$apply_to_children} must be a boolean." . E_SPAN);
     }
     if (isset($ari)) {
         if (self::DEBUG && self::DUMP) {
             u\DebugUtility::dump($ari->toStdClass());
         }
         $this->service->editAccessRights($ari->toStdClass(), $apply_to_children);
     }
     return $this;
 }
コード例 #9
0
 private function checkBoolean($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
 }
コード例 #10
0
 public function setNoFormat($value)
 {
     if (!c\BooleanValues::isBoolean($value)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$value} must be a boolean." . E_SPAN);
     }
     $this->no_format = $value;
     return $this;
 }
コード例 #11
0
 public function setRequireWorkflow($bool)
 {
     if (!c\BooleanValues::isBoolean($bool)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$bool} must be a boolean." . E_SPAN);
     }
     $this->require_workflow = $bool;
     return $this;
 }
 public function setRequired($required)
 {
     if (!c\BooleanValues::isBoolean($required)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$required} must be a boolean." . E_SPAN);
     }
     if ($required) {
         $this->visibility = c\T::VISIBLE;
     }
     $this->required = $required;
     return $this;
 }
コード例 #13
0
 public function setPublishable($publishable)
 {
     if (!c\BooleanValues::isBoolean($publishable)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$publishable} is not a boolean." . E_SPAN);
     }
     $this->publishable = $publishable;
     return $this;
 }
コード例 #14
0
 public function setTitleFieldRequired($title_field_required = false)
 {
     if (!c\BooleanValues::isBoolean($title_field_required)) {
         throw new e\UnacceptableValueException(S_SPAN . "The value {$title_field_required} must be a boolean." . E_SPAN);
     }
     $this->getProperty()->titleFieldRequired = $title_field_required;
     return $this;
 }