Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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