chajr / class-kernel Goto Github PK
View Code? Open in Web Editor NEWMain files for all class libraries.
License: Apache License 2.0
Main files for all class libraries.
License: Apache License 2.0
method will restore full original data not only for single key
create functions to create objects from associative data
mamp of objects in array in tree structure
apply Zend\Serialize for serialize and unserialize BlueObject methods. Also implement managing serialize adapter
change name of some methods to remove prefix used to handle data by magic methods
Will compare given value with existing in object using is
prefix with ===
checking
$object->isSomeData(false);
will return true
if some_data
key is false
optionalu not
keyword
Create logic for all unfinished methods (create collection from other data types)
If _DATA
will have key with null value then getData
will return value of that key, istead of all data from object. Null key must not be handled!
if (!$key) {
$data = $this->_DATA;
}
if (isset($this->_DATA[$key])) {
$data = $this->_DATA[$key];
}
If key
is null then dont check that key exist in _DATA
array
In future data will be normal key inside of object. All methods with *Data
must be marked as deprecated and constructor must not use array detection by data
key.
getData
by toArray
setData
by appendArray
data
key in constructorwhen we set data class should check that data exists on the same key. If it exist check that data is the same as we want to set. When data is the same we don't change object status to modiefied
compare two objects with other than ===
operators
fix delete collection element with original data
after deleting some element form collection can be problems with restore it from original collection
Split Object parts to diffetent classes and allow to load their different versions by Dependency Injection (Zend)
getData(null) - don't change data when _dataRetrieveCallbacks was set up. Works only with get*
magic methods
allow to set serialize adapter for blue object
upgrade data validation to be more generic.
replace some part of BlueObject by corresponding Zend or Symfony libraries
allow to give xml data and export xml data from BlueObject
After creating object with data, dataChanged
will always return true. Also new keys will be added to list.
in _appendSerialized
is doubled unserialize
function that cause problem when try to append serialized array
when validator detect that data to validate is an array will apply validation rule to all elements in array (recursively)
in:
https://github.com/chajr/class-kernel/blob/master/src/Base/BlueObject.php#L1200
must check that $value
is array before insert to array_key_exists
function
Create new class called Helper with some usefull functions.
First function will be method to merge arrays with replacement data in intiger keys (that will resolve problem with merging modified arrays in Collection class)
Whern we get data by getData
method, object can return unmodified data, or wrong modifications. Depends of preperation methods/functions
if class instance dosn't exists we get Undefined index error.
Solution:
if (!isset(self::$_classCounter[$class])) {
self::$_classCounter[$class] = 0;
}
if key value is NULL
and we check that key with has*
magic method we get false
.
Check isset in HadData method
Will extend Object and create collection of data stored in Object class
Create flags to quick enable/disable data validation and change on input, output.
Methods to handle:
public function setFilter() { }
public function getFilters(){ }
public function resetFilters() { }
public function setOrder() { }
public function getOrder() { }
public function resetOrder() { }
add unit test for:
After object is created, add methods to insert data in json, xml, serialized string by special methods.
appendJson
, appendSerialized
, appendXml
, appendStd
compareData:
Apply data validation and preparation when apply data in constructor
some refactor changes for method
use reflection to return object details
Allow to lunch method/function on data before set in $_DATA
array. BlueObject library will have special list (protected $_dataPreparationCallbacks = [];
) with name of key and name of method/function to lunch before data set.
Also add another method to validate data before set in $_DATA
. Wiil work as the same way as above, but as default will be turned off.
_putData
method rewriteAdd some interfaces to Object
and required methods to BlueObject
Iterator
ArrayAccess
apply data preparation for methods _appendArray
, _appendStdClass
, _appendSerialized
, _appendJson
, _appendXml
and _appendSimpleXml
Allow to set up many validation rules for one key
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.