Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcontentlanguage.php
Go to the documentation of this file.
1 <?php
11 class eZContentLanguage extends eZPersistentObject
12 {
16 static function definition()
17 {
18 static $definition = array( 'fields' => array( 'id' => array( 'name' => 'ID',
19 'datatype' => 'integer',
20 'required' => true ),
21 'name' => array( 'name' => 'Name',
22 'datatype' => 'string',
23 'required' => true ),
24 'locale' => array( 'name' => 'Locale',
25 'datatype' => 'string',
26 'required' => true ),
27 'disabled' => array( 'name' => 'Disabled', /* disabled is reserved for the future */
28 'datatype' => 'integer',
29 'default' => 0,
30 'required' => false ) ),
31 'keys' => array( 'id' ),
32 'function_attributes' => array( 'translation' => 'translation',
33 'locale_object' => 'localeObject',
34 'class_count' => 'classCount',
35 'object_count' => 'objectCount' ),
36 'sort' => array( 'name' => 'asc' ),
37 'class_name' => 'eZContentLanguage',
38 'name' => 'ezcontent_language' );
39 return $definition;
40 }
41
52 static function addLanguage( $locale, $name = null )
53 {
54 $localeObject = eZLocale::instance( $locale );
55 if ( !$localeObject )
56 {
57 eZDebug::writeError( "No such locale $locale!", __METHOD__ );
58 return false;
59 }
60
61 if ( $name === null )
62 {
63 $name = $localeObject->attribute( 'intl_language_name' );
64 }
65
66 $db = eZDB::instance();
67
68 $languages = eZContentLanguage::fetchList( true );
69
70 if ( ( $existingLanguage = eZContentLanguage::fetchByLocale( $locale ) ) )
71 {
72 eZDebug::writeWarning( "Language '$locale' already exists!", __METHOD__ );
73 return $existingLanguage;
74 }
75
76 if ( count( $languages ) >= self::maxCount() )
77 {
78 eZDebug::writeError( 'Too many languages, cannot add more!', __METHOD__ );
79 return false;
80 }
81
82 $db->lock( 'ezcontent_language' );
83
84 $idSum = 0;
85 foreach( $languages as $language )
86 {
87 $idSum += $language->attribute( 'id' );
88 }
89
90 // ID 1 is reserved
91 $candidateId = 2;
92 while ( $idSum & $candidateId )
93 {
94 $candidateId *= 2;
95 }
96
97 $newLanguage = new eZContentLanguage( array(
98 'id' => $candidateId,
99 'locale' => $locale,
100 'name' => $name,
101 'disabled' => 0 ) );
102 $newLanguage->store();
103
104 $db->unlock();
105
106 eZContentLanguage::fetchList( true );
107
108 // clear the cache
109 eZContentCacheManager::clearAllContentCache();
110
111 return $newLanguage;
112 }
113
121 static function removeLanguage( $id )
122 {
123 $language = eZContentLanguage::fetch( $id );
124 if ( $language )
125 {
126 return $language->removeThis();
127 }
128 else
129 {
130 return false;
131 }
132 }
133
139 function removeThis()
140 {
141 if ( ($this->objectCount() > 0) or ($this->classCount() > 0) )
142 {
143 return false;
144 }
145
146 $this->remove();
147
148 eZContentCacheManager::clearAllContentCache();
149
150 eZContentLanguage::fetchList( true );
151
152 return true;
153 }
154
163 static function fetchList( $forceReloading = false )
164 {
165 if( isset( $GLOBALS['eZContentLanguageList'] ) && $forceReloading === false )
166 return $GLOBALS['eZContentLanguageList'];
167
168 $cachePath = eZSys::cacheDirectory() . '/ezcontentlanguage_cache.php';
169 $clusterFileHandler = eZClusterFileHandler::instance( $cachePath );
170
171 if( $forceReloading || !$clusterFileHandler->fileExists( $cachePath ) )
172 {
173 $languages = eZPersistentObject::fetchObjectList( eZContentLanguage::definition() );
174 $clusterFileHandler->fileStoreContents( $cachePath, serialize( $languages ), 'content', 'php' );
175 }
176 else
177 {
178 $languages = unserialize( $clusterFileHandler->fetchContents() );
179 // If for some reason unserialize operation fails, we force the cache file to regenerate
180 // See http://issues.ez.no/18613
181 if ( $languages === false )
182 {
183 eZDebug::writeError(
184 "An error occurred while reading content language cache file $cachePath. File is being re-generated",
185 __METHOD__
186 );
187 return self::fetchList( true );
188 }
189 }
190
191 unset( $GLOBALS['eZContentLanguageList'] );
192 unset( $GLOBALS['eZContentLanguageMask'] );
193 $GLOBALS['eZContentLanguageList'] = array();
194 $mask = 1; // we want have 0-th bit set too!
195 foreach ( $languages as $language )
196 {
197 $GLOBALS['eZContentLanguageList'][$language->attribute( 'id' )] = $language;
198 $mask += $language->attribute( 'id' );
199 }
200
201 $GLOBALS['eZContentLanguageMask'] = $mask;
202
203 return $GLOBALS['eZContentLanguageList'];
204 }
205
214 static function fetchLimitationList( $forceReloading = false )
215 {
216 $languages = array();
217 foreach ( eZContentLanguage::fetchList( $forceReloading ) as $language )
218 {
219 $languages[] = array( 'name' => $language->attribute( 'name' ),
220 'id' => $language->attribute( 'locale' ) );
221 }
222 return $languages;
223 }
224
231 static function fetchLocaleList()
232 {
233 $languages = eZContentLanguage::fetchList();
234 $localeList = array();
235
236 foreach ( $languages as $language )
237 {
238 $localeList[] = $language->attribute( 'locale' );
239 }
240
241 return $localeList;
242 }
243
251 static function fetch( $id )
252 {
253 $languages = eZContentLanguage::fetchList();
254
255 return isset( $languages[$id] )? $languages[$id]: false;
256 }
257
264 static function fetchByLocale( $locale, $createIfNotExist = false )
265 {
266 $languages = eZContentLanguage::fetchList();
267
268 foreach ( $languages as $language )
269 {
270 if ( $language->attribute( 'locale' ) == $locale )
271 {
272 return $language;
273 }
274 }
275
276 $language = false;
277 if ( $createIfNotExist )
278 {
279 $language = eZContentLanguage::addLanguage( $locale );
280 }
281
282 return $language;
283 }
284
294 static function prioritizedLanguages( $languageList = false )
295 {
296 if ( !isset( $GLOBALS['eZContentLanguagePrioritizedLanguages'] ) )
297 {
298 $GLOBALS['eZContentLanguagePrioritizedLanguages'] = array();
299
300 $ini = eZINI::instance();
301
302 $languageListAsParameter = false;
303 if ( $languageList )
304 {
305 $languageListAsParameter = true;
306 }
307
308 if ( !$languageList && $ini->hasVariable( 'RegionalSettings', 'SiteLanguageList' ) )
309 {
310 $languageList = $ini->variable( 'RegionalSettings', 'SiteLanguageList' );
311 }
312
313 if ( !$languageList )
314 {
315 $languageList = array( $ini->variable( 'RegionalSettings', 'ContentObjectLocale' ) );
316 }
317
318 $processedLocaleCodes = array();
319 foreach ( $languageList as $localeCode )
320 {
321 if ( in_array( $localeCode, $processedLocaleCodes ) )
322 {
323 continue;
324 }
325 $processedLocaleCodes[] = $localeCode;
326 $language = eZContentLanguage::fetchByLocale( $localeCode );
327 if ( $language )
328 {
329 $GLOBALS['eZContentLanguagePrioritizedLanguages'][] = $language;
330 }
331 else
332 {
333 eZDebug::writeWarning( "Language '$localeCode' does not exist or is not used!", __METHOD__ );
334 }
335 }
336
337 if ( ( !$languageListAsParameter && $ini->variable( 'RegionalSettings', 'ShowUntranslatedObjects' ) == 'enabled' ) ||
338 ( isset( $GLOBALS['eZContentLanguageCronjobMode'] ) && $GLOBALS['eZContentLanguageCronjobMode'] ) )
339 {
340 $completeList = eZContentLanguage::fetchList();
341 foreach ( $completeList as $language )
342 {
343 if ( !in_array( $language->attribute( 'locale' ), $languageList ) )
344 {
345 $GLOBALS['eZContentLanguagePrioritizedLanguages'][] = $language;
346 }
347 }
348 }
349 }
350
351 return $GLOBALS['eZContentLanguagePrioritizedLanguages'];
352 }
353
361 static function prioritizedLanguageCodes()
362 {
363 $languages = eZContentLanguage::prioritizedLanguages();
364 $localeList = array();
365
366 foreach ( $languages as $language )
367 {
368 $localeList[] = $language->attribute( 'locale' );
369 }
370
371 return $localeList;
372 }
373
381 static function setPrioritizedLanguages( $languages )
382 {
383 unset( $GLOBALS['eZContentLanguagePrioritizedLanguages'] );
384 eZContentLanguage::prioritizedLanguages( $languages );
385 }
386
393 static function clearPrioritizedLanguages()
394 {
395 eZContentLanguage::setPrioritizedLanguages( false );
396 }
397
404 static function topPriorityLanguage()
405 {
406 $prioritizedLanguages = eZContentLanguage::prioritizedLanguages();
407 if ( $prioritizedLanguages )
408 {
409 return $prioritizedLanguages[0];
410 }
411 else
412 {
413 return false;
414 }
415 }
416
420 function localeObject()
421 {
422 $locale = eZLocale::instance( $this->Locale );
423 return $locale;
424 }
425
432 static function languagesByMask( $mask )
433 {
434 $result = array();
435
436 $languages = eZContentLanguage::fetchList();
437 foreach ( $languages as $key => $language )
438 {
439 if ( (int) $key & (int) $mask )
440 {
441 $result[$language->attribute( 'locale' )] = $language;
442 }
443 }
444
445 return $result;
446 }
447
454 static function prioritizedLanguagesByMask( $mask )
455 {
456 $result = array();
457
458 $languages = eZContentLanguage::prioritizedLanguages();
459 foreach ( $languages as $language )
460 {
461 if ( ( (int) $language->attribute( 'id' ) & (int) $mask ) > 0 )
462 {
463 $result[$language->attribute( 'locale' )] = $language;
464 }
465 }
466
467 return $result;
468 }
469
477 static function prioritizedLanguagesByLocaleList( $languageLocaleList )
478 {
479 $result = array();
480
481 if ( is_array( $languageLocaleList ) && count( $languageLocaleList ) > 0 )
482 {
483 $languages = eZContentLanguage::prioritizedLanguages();
484 foreach ( $languages as $language )
485 {
486 if ( in_array( $language->attribute( 'locale' ), $languageLocaleList ) )
487 {
488 $result[$language->attribute( 'locale' )] = $language;
489 }
490 }
491 }
492
493 return $result;
494 }
495
502 static function topPriorityLanguageByMask( $mask )
503 {
504 $languages = eZContentLanguage::prioritizedLanguages();
505 foreach ( $languages as $language )
506 {
507 if ( ( (int) $language->attribute( 'id' ) & (int) $mask ) > 0 )
508 {
509 return $language;
510 }
511 }
512 return false;
513 }
514
522 static function topPriorityLanguageByLocaleList( $languageLocaleList )
523 {
524 if ( is_array( $languageLocaleList ) && count( $languageLocaleList ) > 0 )
525 {
526 $languages = eZContentLanguage::prioritizedLanguages();
527 foreach ( $languages as $language )
528 {
529 if ( in_array( $language->attribute( 'locale' ), $languageLocaleList ) )
530 {
531 return $language;
532 }
533 }
534 }
535
536 return false;
537 }
538
546 static function maskByLocale( $locales, $setZerothBit = false )
547 {
548 if ( !$locales )
549 {
550 return 0;
551 }
552
553 if ( !is_array( $locales ) )
554 {
555 $locales = array( $locales );
556 }
557
558 $mask = 0;
559 if ( $setZerothBit )
560 {
561 $mask = 1;
562 }
563
564 foreach( $locales as $locale )
565 {
566 $language = eZContentLanguage::fetchByLocale( $locale );
567 if ( $language )
568 {
569 $mask |= $language->attribute( 'id' );
570 }
571 }
572
573 return (int) $mask;
574 }
575
588 public static function decodeLanguageMask( $langMask, $returnLanguageLocale = false )
589 {
590 $maxNumberOfLanguges = self::maxCount();
591 $maxInteger = pow( 2, $maxNumberOfLanguges );
592
593 $list = array();
594
595 // Applying this bit-logic on negative numbers, or numbers out of bounds
596 // will have unexpected results.
597 if ( $langMask < 0 or $langMask > $maxInteger or $langMask == 1 )
598 {
599 // We use the default language if the situation above occurs
600 $defaultLanguage = eZContentLanguage::topPriorityLanguage();
601 $langMask = $defaultLanguage->attribute( 'id' );
602 }
603
604 $alwaysAvailable = $langMask % 2;
605 $mask = $langMask & ~1;
606
607 // Calculating which translations are present in the current version
608 for ( $i = 1; $i < $maxNumberOfLanguges; ++$i )
609 {
610 $newMask = 1 << $i;
611 if ( ($newMask & $mask) > 0 )
612 {
613 if ( $returnLanguageLocale )
614 {
615 $list[] = eZContentLanguage::fetch( $newMask )->attribute( 'locale' );
616 }
617 else
618 {
619 $list[] = $newMask;
620 }
621 }
622 }
623
624 return array(
625 'always_available' => $alwaysAvailable,
626 'language_list' => $list
627 );
628 }
629
637 static function idByLocale( $locale )
638 {
639 $language = eZContentLanguage::fetchByLocale( $locale );
640 if ( $language )
641 {
642 return (int)$language->attribute( 'id' );
643 }
644 else
645 {
646 return false;
647 }
648 }
649
659 static function languagesSQLFilter( $languageListTable, $languageListAttributeName = 'language_mask' )
660 {
661 $prioritizedLanguages = eZContentLanguage::prioritizedLanguages();
662 $mask = 1; // 1 - always available objects
663 foreach( $prioritizedLanguages as $language )
664 {
665 $mask += $language->attribute( 'id' );
666 }
667
668 $db = eZDB::instance();
669 if ( $db->databaseName() == 'oracle' )
670 {
671 return "\n bitand( $languageListTable.$languageListAttributeName, $mask ) > 0 \n";
672 }
673 else
674 {
675 return "\n $languageListTable.$languageListAttributeName & $mask > 0 \n";
676 }
677 }
678
692 static function sqlFilter( $languageTable, $languageListTable = null, $languageAttributeName = 'language_id', $languageListAttributeName = 'language_mask', $lang = false )
693 {
694 $db = eZDB::instance();
695
696 if ( $languageListTable === null )
697 {
698 $languageListTable = $languageTable;
699 }
700
701 $prioritizedLanguages = eZContentLanguage::prioritizedLanguages();
702 if ( is_string( $lang ) )
703 $lang = eZContentLanguage::fetchByLocale( $lang );
704 if ( $lang instanceof eZContentLanguage )
705 array_unshift( $prioritizedLanguages, $lang );
706
707 if ( $db->databaseName() == 'oracle' )
708 {
709 $leftSide = "bitand( $languageListTable.$languageListAttributeName - bitand( $languageListTable.$languageListAttributeName, $languageTable.$languageAttributeName ), 1 )\n";
710 $rightSide = "bitand( $languageTable.$languageAttributeName, 1 )\n";
711 }
712 else
713 {
714 $leftSide = " ( ( $languageListTable.$languageListAttributeName - ( $languageListTable.$languageListAttributeName & $languageTable.$languageAttributeName ) ) & 1 )\n";
715 $rightSide = " ( $languageTable.$languageAttributeName & 1 )\n";
716 }
717
718 for ( $index = count( $prioritizedLanguages ) - 1, $multiplier = 2; $index >= 0; $index--, $multiplier *= 2 )
719 {
720 $id = $prioritizedLanguages[$index]->attribute( 'id' );
721
722 if ( $db->databaseName() == 'oracle' )
723 {
724 $leftSide .= " + bitand( $languageListTable.$languageListAttributeName - bitand( $languageListTable.$languageListAttributeName, $languageTable.$languageAttributeName ), $id )";
725 $rightSide .= " + bitand( $languageTable.$languageAttributeName, $id )";
726 }
727 else
728 {
729 $leftSide .= " + ( ( ( $languageListTable.$languageListAttributeName - ( $languageListTable.$languageListAttributeName & $languageTable.$languageAttributeName ) ) & $id )";
730 $rightSide .= " + ( ( $languageTable.$languageAttributeName & $id )";
731 }
732
733 if ( $multiplier > $id )
734 {
735 $factor = $multiplier / $id;
736 if ( $db->databaseName() == 'oracle' )
737 {
738 $factorTerm = ' * ' . $factor;
739 }
740 else
741 {
742 for ( $shift = 0; $factor > 1; $factor = $factor / 2, $shift++ ) ;
743 $factorTerm = ' << '. $shift;
744 }
745 $leftSide .= $factorTerm;
746 $rightSide .= $factorTerm;
747 }
748 else if ( $multiplier < $id )
749 {
750 $factor = $id / $multiplier;
751 if ( $db->databaseName() == 'oracle' )
752 {
753 $factorTerm = ' / ' . $factor;
754 }
755 else
756 {
757 for ( $shift = 0; $factor > 1; $factor = $factor / 2, $shift++ ) ;
758 $factorTerm = ' >> '. $shift;
759 }
760 $leftSide .= $factorTerm;
761 $rightSide .= $factorTerm;
762 }
763 if ( $db->databaseName() != 'oracle' )
764 {
765 $leftSide .= " )\n";
766 $rightSide .= " )\n";
767 }
768 }
769
770 if ( $db->databaseName() == 'oracle' )
771 {
772 $sql = "bitand( $languageTable.$languageAttributeName, $languageListTable.$languageListAttributeName ) > 0";
773 }
774 else
775 {
776 $sql = "$languageTable.$languageAttributeName & $languageListTable.$languageListAttributeName > 0";
777 }
778
779 return "\n ( $sql AND\n $leftSide <\n $rightSide ) \n";
780 }
781
785 function objectCount()
786 {
787 $db = eZDB::instance();
788
789 $languageID = $this->ID;
790 if ( $db->databaseName() == 'oracle' )
791 {
792 $whereSQL = "bitand( language_mask, $languageID ) > 0";
793 }
794 else
795 {
796 $whereSQL = "language_mask & $languageID > 0";
797 }
798
799 $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentobject WHERE $whereSQL" );
800 return $count[0]['count'];
801 }
802
806 function classCount()
807 {
808 $db = eZDB::instance();
809
810 $languageID = $this->ID;
811 if ( $db->databaseName() == 'oracle' )
812 {
813 $whereSQL = "bitand( language_mask, $languageID ) > 0";
814 }
815 else
816 {
817 $whereSQL = "language_mask & $languageID > 0";
818 }
819
820 $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentclass WHERE $whereSQL" );
821 $count = $count[0]['count'];
822
823 return $count;
824 }
825
826
830 function objectInitialCount()
831 {
832 $db = eZDB::instance();
833
834 $languageID = $this->ID;
835 $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentobject WHERE initial_language_id = '$languageID'" );
836 $count = $count[0]['count'];
837
838 return $count;
839 }
840
844 function translation()
845 {
846 return $this;
847 }
848
855 static function setCronjobMode( $enable = true )
856 {
857 $GLOBALS['eZContentLanguageCronjobMode'] = $enable;
858 unset( $GLOBALS['eZContentLanguagePrioritizedLanguages'] );
859 }
860
866 static function clearCronjobMode()
867 {
868 eZContentLanguage::setCronjobMode( false );
869 }
870
878 static function jsArrayByMask( $mask )
879 {
880 $localList = array();
881 $languages = eZContentLanguage::prioritizedLanguagesByMask( $mask );
882 foreach ( $languages as $key => $language )
883 {
884 $localList[] = array( 'locale' => $language->attribute( 'locale' ),
885 'name' => $language->attribute( 'name' ) );
886 }
887
888 if ( $localList )
889 {
890 return json_encode( $localList );
891 }
892 else
893 {
894 return false;
895 }
896 }
897
901 static function maskForRealLanguages()
902 {
903 if ( !isset( $GLOBALS['eZContentLanguageMask'] ) )
904 {
905 eZContentLanguage::fetchList( true );
906 }
907 return $GLOBALS['eZContentLanguageMask'];
908 }
909
916 static function expireCache( $expireCluster = true )
917 {
918 unset( $GLOBALS['eZContentLanguageList'],
919 $GLOBALS['eZContentLanguagePrioritizedLanguages'],
920 $GLOBALS['eZContentLanguageMask'],
921 $GLOBALS['eZContentLanguageCronjobMode'] );
922
923 // With the solution to #14227 we also need to clear the cached
924 // list of languages
925 if ( $expireCluster )
926 {
927 $cachePath = eZSys::cacheDirectory() . '/ezcontentlanguage_cache.php';
928 eZClusterFileHandler::instance()->fileDelete( $cachePath );
929 }
930 }
931
940 static public function maxCount()
941 {
942 return ( 8 * PHP_INT_SIZE ) - 2;
943 }
944
945 public $ID;
946 public $Name;
947 public $Locale;
948 public $Disabled;
949 }
eZClusterFileHandler\instance
static instance( $filename=false)
Definition: ezclusterfilehandler.php:21
eZContentCacheManager\clearAllContentCache
static clearAllContentCache( $ignoreINISettings=false)
Definition: ezcontentcachemanager.php:1116
eZContentLanguage
Definition: ezcontentlanguage.php:12
eZContentLanguage\topPriorityLanguageByLocaleList
static topPriorityLanguageByLocaleList( $languageLocaleList)
Definition: ezcontentlanguage.php:522
eZContentLanguage\prioritizedLanguagesByLocaleList
static prioritizedLanguagesByLocaleList( $languageLocaleList)
Definition: ezcontentlanguage.php:477
eZContentLanguage\fetchLimitationList
static fetchLimitationList( $forceReloading=false)
Definition: ezcontentlanguage.php:214
eZContentLanguage\topPriorityLanguage
static topPriorityLanguage()
Definition: ezcontentlanguage.php:404
eZContentLanguage\clearPrioritizedLanguages
static clearPrioritizedLanguages()
Definition: ezcontentlanguage.php:393
eZContentLanguage\setCronjobMode
static setCronjobMode( $enable=true)
Definition: ezcontentlanguage.php:855
eZContentLanguage\removeThis
removeThis()
Definition: ezcontentlanguage.php:139
eZContentLanguage\removeLanguage
static removeLanguage( $id)
Definition: ezcontentlanguage.php:121
eZContentLanguage\localeObject
localeObject()
Definition: ezcontentlanguage.php:420
eZContentLanguage\fetchList
static fetchList( $forceReloading=false)
Definition: ezcontentlanguage.php:163
eZContentLanguage\fetchLocaleList
static fetchLocaleList()
Definition: ezcontentlanguage.php:231
eZContentLanguage\sqlFilter
static sqlFilter( $languageTable, $languageListTable=null, $languageAttributeName='language_id', $languageListAttributeName='language_mask', $lang=false)
Definition: ezcontentlanguage.php:692
eZContentLanguage\maxCount
static maxCount()
Definition: ezcontentlanguage.php:940
eZContentLanguage\fetch
static fetch( $id)
Definition: ezcontentlanguage.php:251
eZContentLanguage\objectInitialCount
objectInitialCount()
Definition: ezcontentlanguage.php:830
eZContentLanguage\prioritizedLanguages
static prioritizedLanguages( $languageList=false)
Definition: ezcontentlanguage.php:294
eZContentLanguage\addLanguage
static addLanguage( $locale, $name=null)
Definition: ezcontentlanguage.php:52
eZContentLanguage\jsArrayByMask
static jsArrayByMask( $mask)
Definition: ezcontentlanguage.php:878
eZContentLanguage\translation
translation()
Definition: ezcontentlanguage.php:844
eZContentLanguage\objectCount
objectCount()
Definition: ezcontentlanguage.php:785
eZContentLanguage\$Disabled
$Disabled
Definition: ezcontentlanguage.php:948
eZContentLanguage\idByLocale
static idByLocale( $locale)
Definition: ezcontentlanguage.php:637
eZContentLanguage\$ID
$ID
Definition: ezcontentlanguage.php:945
eZContentLanguage\$Locale
$Locale
Definition: ezcontentlanguage.php:947
eZContentLanguage\topPriorityLanguageByMask
static topPriorityLanguageByMask( $mask)
Definition: ezcontentlanguage.php:502
eZContentLanguage\$Name
$Name
Definition: ezcontentlanguage.php:946
eZContentLanguage\maskForRealLanguages
static maskForRealLanguages()
Definition: ezcontentlanguage.php:901
eZContentLanguage\prioritizedLanguagesByMask
static prioritizedLanguagesByMask( $mask)
Definition: ezcontentlanguage.php:454
eZContentLanguage\classCount
classCount()
Definition: ezcontentlanguage.php:806
eZContentLanguage\maskByLocale
static maskByLocale( $locales, $setZerothBit=false)
Definition: ezcontentlanguage.php:546
eZContentLanguage\expireCache
static expireCache( $expireCluster=true)
Definition: ezcontentlanguage.php:916
eZContentLanguage\definition
static definition()
Definition: ezcontentlanguage.php:16
eZContentLanguage\prioritizedLanguageCodes
static prioritizedLanguageCodes()
Definition: ezcontentlanguage.php:361
eZContentLanguage\languagesByMask
static languagesByMask( $mask)
Definition: ezcontentlanguage.php:432
eZContentLanguage\languagesSQLFilter
static languagesSQLFilter( $languageListTable, $languageListAttributeName='language_mask')
Definition: ezcontentlanguage.php:659
eZContentLanguage\decodeLanguageMask
static decodeLanguageMask( $langMask, $returnLanguageLocale=false)
Definition: ezcontentlanguage.php:588
eZContentLanguage\setPrioritizedLanguages
static setPrioritizedLanguages( $languages)
Definition: ezcontentlanguage.php:381
eZContentLanguage\fetchByLocale
static fetchByLocale( $locale, $createIfNotExist=false)
Definition: ezcontentlanguage.php:264
eZContentLanguage\clearCronjobMode
static clearCronjobMode()
Definition: ezcontentlanguage.php:866
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZDebug\writeWarning
static writeWarning( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:502
eZLocale\instance
static instance( $localeString=false)
Definition: ezlocale.php:1536
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\count
static count( $def, $conds=null, $field=null)
Definition: ezpersistentobject.php:187
eZPersistentObject\fetchObjectList
static fetchObjectList( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
Definition: ezpersistentobject.php:806
eZSys\cacheDirectory
static cacheDirectory()
Definition: ezsys.php:527
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.