Overview

Namespaces

  • Cron
  • None

Classes

  • _HtmlGrid_TableOut
  • _TransactionModel_RawSaveOperation
  • AccessControlComponent
  • AccessControlHelper
  • ActionListHelper
  • ActiveDirectoryUtils
  • AddCurrentPidToSchedulingShellCallLogs
  • AnonymousFunctionOperation
  • ArrayUtil
  • AssociationIntegrityBehavior
  • AtomicOperation
  • AuthenticationComponent
  • AuthenticationController
  • AuthenticationUser
  • AutocompleteDatasourceComponent
  • BaseModelComponent
  • Basics
  • CakeLayersHelper
  • CheckAndRunShell
  • ClassSearcher
  • CommandLineUtil
  • CommonValidationBehavior
  • ConfigurableShellCallsSchedulingTask
  • ConfigurationKey
  • ConfigurationKeys
  • ConfigurationKeysController
  • Context
  • ContextComponent
  • ContextHelper
  • Contexts
  • ControllerInspector
  • ControllerMenuHelper
  • CreateJournalingTables
  • CreateTableConfigurationKeys
  • CreateTableSchedulingConfigurableShellCalls
  • CreateTableSchedulingShellCallLogs
  • CreateTableSettedConfigurationKeys
  • CreateTableUserResetPasswordRequests
  • CreateTableUsers
  • CronSchedulingInstaller
  • CronValidationBehavior
  • CssBox
  • CssController
  • CssProperties
  • CssShell
  • CsvUtil
  • CustomDataModel
  • DatasourceDumperManager
  • DateTimeInput
  • DependencyShell
  • DetailHelper
  • DumperShell
  • ExtendedFieldsAccessControl
  • ExtendedFieldSet
  • ExtendedFieldSetHelper
  • ExtendedFieldsParser
  • ExtendedFormHelper
  • ExtendedHasManyAppModel
  • ExtendedOperationsBehavior
  • FieldDefinition
  • FieldRowDefinition
  • FieldSetDefinition
  • FieldSetLayoutHelper
  • FileOperations
  • FileOperations_Rename
  • FileOperations_SymLink
  • FileOperations_Touch
  • FileOperations_Unlink
  • FileSystem
  • FixConfigurationKeysPrimaryKey
  • FixSettedConfigurationKeysPrimaryKey
  • HasManyUtilsBehavior
  • HtmlDocument
  • HtmlGrid
  • HtmlGrid_Cell
  • HttpClient
  • HttpResponse
  • ImapClient
  • ImapMailBox
  • ImapParserShell
  • IncludePath
  • InputMasked
  • InputSearchable
  • InputsOnSubmit
  • InstallShell
  • JenkinsBuildShell
  • Journal
  • JournalDetail
  • JournalizedBehavior
  • JsonResponseComponent
  • LayoutsHelper
  • Ldap
  • LdapUtils
  • ListFieldSet
  • ListFieldSetHelper
  • ListsHelper
  • MailParser
  • Make
  • MenuHelper
  • MigrationAllPluginsShell
  • ModelOperations
  • ModelOperations_Delete
  • ModelOperations_Save
  • ModelTraverser
  • MysqlDumper
  • OpenLdapUtils
  • PaginatorUtilComponent
  • PaginatorUtilComponentFilter
  • PaginatorUtilHelper
  • Plugin
  • PluginManager
  • Reflections
  • RenameEnabledToActiveFromUsersTable
  • RunShellCallShell
  • ScaffoldUtilComponent
  • ScaffoldUtilHelper
  • Scheduling
  • SchedulingConfigurableShellCall
  • SchedulingConfigurableShellCallsController
  • SchedulingShellCallLog
  • SchedulingShellCallLogsController
  • SettedConfigurationKey
  • StuffreposPluginsRename
  • TimeZoneBehavior
  • TransactionModel
  • TransactionOperation
  • Translator
  • TranslatorShell
  • User
  • UserAuthenticationComponent
  • UserChangePassword
  • UserResetPassword
  • UserResetPasswordRequest
  • UserResetPasswordRequestSubmission
  • UsersController
  • ViewUtilHelper

Interfaces

  • AccessControlFilter
  • CommitableOperation
  • DatasourceDumper
  • MakeListener
  • SchedulingInstaller
  • TasksObject
  • UndoableOperation

Exceptions

  • LdapObjectNotWritableException
  • ModelTraverserException
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: class CssProperties {
 4: 
 5:     /**
 6:      *
 7:      * @var array
 8:      */
 9:     private $properties;
10: 
11:     /**
12:      * 
13:      * @param array $properties
14:      */
15:     public function __construct($properties) {
16:         $this->properties = $properties;
17:     }
18: 
19:     /**
20:      * 
21:      * @param mixed $selectors String or array
22:      * @return string
23:      */
24:     public function build($selectors, $pseudoClass = false) {
25:         $b = $this->_selectors($selectors, $pseudoClass) . " {\n";
26:         foreach ($this->properties as $name => $value) {
27:             $b .= $this->_buildProperty($name, $value);
28:         }
29:         $b .= "}\n";
30: 
31:         return $b;
32:     }
33:     
34:     /**
35:      * 
36:      * @param CssProperties $otherProperties
37:      * @return CssProperties
38:      */
39:     public function add(CssProperties $otherProperties) {
40:         return new CssProperties(
41:                 array_merge(
42:                         $this->properties
43:                         , $otherProperties->properties
44:                 )
45:         );
46:     }
47: 
48:     private function _selectors($selectors, $pseudoClass) {
49:         if (!is_array($selectors)) {
50:             $selectors = explode(',', $selectors);
51:         }
52: 
53:         $b = array();
54:         foreach ($selectors as $selector) {
55:             $s = trim($selector);
56:             if ($pseudoClass) {
57:                 $s .= ':' . $pseudoClass;
58:             }
59:             $b[] = $s;
60:         }
61:         return implode(', ', $b);
62:     }
63: 
64:     /**
65:      * 
66:      * @param string $name
67:      * @param mixed $value String or array.
68:      * @return string
69:      */
70:     private function _buildProperty($name, $value) {
71:         $value = ArrayUtil::arraylize($value);
72: 
73:         $b = '';
74:         foreach ($value as $v) {
75:             $b .= "\t$name: $v;\n";
76:         }
77:         return $b;
78:     }
79: 
80: }
API documentation generated by ApiGen 2.8.0