Animation.php
1 year ago
Background.php
1 year ago
BackgroundImage.php
1 year ago
Border.php
2 years ago
BoxShadow.php
1 year ago
ColumnWidth.php
1 year ago
CustomHeight.php
1 year ago
CustomSize.php
4 years ago
Gap.php
1 year ago
Height.php
1 year ago
JustifyContent.php
1 year ago
MaxWidth.php
1 year ago
MultipleImage.php
1 year ago
ObjectCss.php
1 year ago
Opacity.php
1 year ago
Property.php
1 year ago
PropertyBase.php
1 year ago
Size.php
1 year ago
Stroke.php
1 year ago
TBLR.php
1 year ago
TextShadow.php
1 year ago
Transform.php
2 years ago
Transition.php
1 year ago
Typography.php
1 month ago
UnitValuePercentage.php
1 year ago
UnitValuePx.php
1 year ago
ValueProxy.php
4 years ago
Width.php
1 year ago
PropertyBase.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kubio\Core\StyleManager\Props; |
| 4 | |
| 5 | use Kubio\Config; |
| 6 | use Kubio\Core\LodashBasic; |
| 7 | |
| 8 | class PropertyBase { |
| 9 | |
| 10 | public $value; |
| 11 | public $name = ''; |
| 12 | public $_config; |
| 13 | public $merged = array(); |
| 14 | |
| 15 | |
| 16 | public function __construct( $name = '' ) { |
| 17 | $this->name = $name; |
| 18 | } |
| 19 | |
| 20 | public function parse( $value, $options ) { |
| 21 | return $value; |
| 22 | } |
| 23 | |
| 24 | public function valueWithDefault( $value ) { |
| 25 | $defaultValue = $this->getDefaultValue(); |
| 26 | return LodashBasic::merge( array(), $defaultValue, $value ); |
| 27 | } |
| 28 | |
| 29 | public function getDefaultValue() { |
| 30 | return $this->config( 'default' ); |
| 31 | } |
| 32 | |
| 33 | public function config( $path ) { |
| 34 | return Config::value( 'props.' . $this->name . '.' . $path ); |
| 35 | } |
| 36 | } |
| 37 |